These scales map the categories of a variable to the styles drawn by
geom_urban_square(). scale_style_discrete() is the default, and uses
the styles in a fixed order: "outline", "frame", "fill", "hollow",
"quarter". scale_style_manual() gives the style of each category
explicitly, and scale_style_identity() uses a column that already holds
style names.
Arguments
- name
The legend title.
- ...
Other arguments passed on to
ggplot2::discrete_scale(),ggplot2::scale_discrete_manual(), orggplot2::scale_discrete_identity().- guide
The legend type.
- values
For
scale_style_manual(), a character vector of styles, named by category.
Examples
library(ggplot2)
cells <- data.frame(x = 1:5, y = 1, use = letters[1:5])
ggplot(cells, aes(x, y, style = use)) +
geom_urban_square() +
coord_equal()