| plot.controlledburn | R Documentation |
Draw a burn() result in map coordinates (asp = 1) with the grid
extent as the frame. Two renderings are available:
## S3 method for class 'controlledburn'
plot(
x,
what = c("auto", "exact", "overview"),
marginals = TRUE,
col = grDevices::hcl.colors(64, "YlOrRd", rev = TRUE),
by_id = FALSE,
tiles = 256L,
threshold = 50000,
content = FALSE,
main = NULL,
...
)
x |
A |
what |
|
marginals |
Draw the row and column marginal strips. The layout is sized from the extent's aspect ratio so the strips span exactly the map; leftover device space is left blank. |
col |
Colour ramp (low to high coverage) for |
by_id |
In |
tiles |
Passed to |
threshold |
Record count above which |
content |
Draw the content extent (bounding box of touched cells) as a dashed rectangle. |
main |
Optional title, drawn in the outer margin above the strips. |
... |
Passed to |
"exact"every record is drawn: runs as rectangles, edge cells shaded by coverage fraction, line cells shaded by length (relative to the cell diagonal), points as cells. Cost is one rectangle per record, so this is the picture of the sparse representation itself.
"overview"the coarse mean-coverage matrix from
overview_burn() drawn with ximage::ximage(). Cost does not
depend on grid size.
"auto" (default) picks "exact" when the total record count is at
most threshold, else "overview". Either way the optional marginal
strips are exact: covered cells per grid row (right) and per grid
column (top), from summary.controlledburn().
x, invisibly, with the summary computed for the marginals
attached as attribute summary.
if (requireNamespace("geos", quietly = TRUE)) {
poly <- geos::as_geos_geometry(c("POLYGON ((1 1, 9 1, 9 9, 1 9, 1 1))",
"POLYGON ((2 2, 4 3, 3 5, 2 2))"))
r <- burn(poly, extent = c(0, 10, 0, 10), dimension = c(40L, 40L))
plot(r)
plot(r, by_id = TRUE, marginals = FALSE)
plot(r, what = "overview", tiles = 10)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.