scale_logical_discrete | R Documentation |
Provides a color scale for logical
values.
scale_colour_logical(..., aesthetics = "colour")
scale_color_logical(..., aesthetics = "colour")
scale_fill_logical(..., aesthetics = "fill")
... |
Arguments passed to |
aesthetics |
A |
A discrete scale.
N. Frerebeau
Other qualitative color schemes:
scale_colour_land()
,
scale_colour_soil()
,
scale_colour_stratigraphy()
,
scale_okabeito_discrete
,
scale_tol_bright
,
scale_tol_dark
,
scale_tol_highcontrast
,
scale_tol_light
,
scale_tol_mediumcontrast
,
scale_tol_muted
,
scale_tol_pale
,
scale_tol_vibrant
library(ggplot2)
logic <- data.frame(
x = rep(1:5, times = 5),
y = rep(1:5, each = 5),
values = sample(c(TRUE, FALSE), 25, TRUE)
)
ggplot2::ggplot(logic, ggplot2::aes(x, y, fill = values)) +
ggplot2::geom_raster() +
scale_fill_logical()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.