Draws the hierarchy as an icicle: one row per level, coarsest at the top, each region's width proportional to its share of the weight.
Usage
geoscale_autoplot(
x,
weight = NULL,
fill = c("level", "region"),
label = TRUE,
...
)
autoplot.Geoscale(x, ...)Arguments
- x
A
Geoscale.- weight
Weight column determining widths.
NULLuses the default.- fill
What to colour by:
"level"or"region".- label
Draw region codes on the rectangles.
- ...
Unused.
Details
This is the structure plot — it shows the Geoscale itself and needs no
geometry. For a map of values over regions, see geoscale_plot().
Also registered as an autoplot() method, so ggplot2::autoplot(gs) works
when ggplot2 is installed.
Examples
if (requireNamespace("ggplot2", quietly = TRUE)) {
geoscale_autoplot(geoscale_example())
}