
Binary Discrete Colour Schemes for ggplot2 and ggraph
Source:R/scale_colour_other.R
scale_logical_discrete.Rd
Provides a colour scale for logical
values.
Usage
scale_colour_logical(..., aesthetics = "colour")
scale_color_logical(..., aesthetics = "colour")
scale_fill_logical(..., aesthetics = "fill")
Arguments
- ...
Arguments passed to
ggplot2::discrete_scale()
.- aesthetics
A
character
string or vector of character strings listing the name(s) of the aesthetic(s) that this scale works with.
Value
A discrete scale.
See also
Other qualitative colour 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
Examples
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()