histogram_guide <- compose_sandwich(
middle = gizmo_histogram(just = 0),
text = "axis_base",
position = "bottom"
)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
ggplot(nc) +
geom_sf(aes(fill = AREA)) +
guides(fill = histogram_guide)
histogram_guide <- compose_sandwich(
middle = gizmo_histogram(just = 0),
text = "axis_base",
position = "bottom"
)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
ggplot(nc) +
geom_sf(aes(fill = AREA)) +
guides(fill = histogram_guide)