View source: R/scale_mapbaltimore.R
scale_mapbaltimore | R Documentation |
Custom palettes for two package datasets: mta_bus_lines
and hmt_2017
(both for cluster and cluster group).
scale_mapbaltimore(
palette = NULL,
values = NULL,
na.value = "grey50",
aesthetics = c("color", "fill"),
error_call = caller_env(),
...
)
scale_color_mapbaltimore(palette = NULL, na.value = "grey50", ...)
scale_fill_mapbaltimore(palette = NULL, na.value = "grey50", ...)
palette |
Options include "mta_bus", "hmt_2017", "hmt_cluster",
"cluster", "hmt_cluster_group", or "cluster_group", Default: |
values |
a set of aesthetic values to map data values to. The values
will be matched in order (usually alphabetical) with the limits of the
scale, or with |
na.value |
Defaults to "grey50" |
aesthetics |
Character string or vector of character strings listing the
name(s) of the aesthetic(s) that this scale works with. This can be useful, for
example, to apply colour settings to the |
error_call |
The execution environment of a currently
running function, e.g. |
... |
Arguments passed on to
|
## Not run:
if (interactive()) {
library(ggplot2)
ggplot(data = dplyr::filter(mta_bus_lines, frequent)) +
geom_sf(aes(color = route_abb), alpha = 0.5, size = 2) +
scale_mapbaltimore(palette = "bus") +
theme_minimal()
ggplot(data = hmt_2017) +
geom_sf(aes(fill = cluster_group, color = cluster_group)) +
scale_mapbaltimore(palette = "cluster_group") +
theme_minimal()
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.