Skip to contents

Visualises the geography attached to a model, scenario, config, or a bare geoscales::GeoScale: a membership map of one geoframe ("map"), a layered view of ALL geoframes stacked in a cabinet/perspective projection with the coarsest level at the bottom ("stack"), or the geometry-free "icicle" diagram.

Usage

plot_geoscale(
  object,
  type = c("map", "stack", "icicle"),
  geoframe = NULL,
  view = "cabinet",
  direction = "down",
  geoscale = NULL,
  ...
)

Arguments

object

a model, scenario, config, or geoscales::GeoScale.

type

"map", "stack", or "icicle".

geoframe

for "map": the geoframe whose membership colours the atoms; default = the coarsest level above the atoms.

view

stack projection ("cabinet", "perspective", ... – see geoscales::geoscale_autoplot()).

direction

"down" (default) draws the coarsest geoframe at the bottom of the stack; "up" at the top.

geoscale

a geoscales::GeoScale override, or NULL to resolve from object.

...

passed to the geoscales plotting functions.

Value

A ggplot object.

Details

"map" and "stack" need attached geometry (see geoscales::attach_geometry_geoscale()) and the sf package; "icicle" works without either and is the fallback the report templates degrade to.

Examples

gs <- topia$geoscales$squares

# the nesting of a geoscale, without any geometry
plot_geoscale(gs, type = "icicle")

plot_geoscale(gs, type = "stack")


# the map itself
plot_geoscale(gs, type = "map")