A specialized line type scale that maps categories to distinct line patterns optimized for black and white visualizations and accessibility.
Arguments
- categories
Character vector. Categories to map (if NULL, uses data)
- style
Character. Line type style (see
vecshift_linetypes)- reverse
Logical. Whether to reverse line type order (default: FALSE)
- ...
Additional arguments passed to ggplot2 scale functions
Examples
if (FALSE) { # \dontrun{
library(ggplot2)
# For employment data
ggplot(data, aes(x = time, y = count, linetype = employment_status)) +
geom_line() +
scale_linetype_vecshift(style = "employment")
# For general categories
ggplot(data, aes(x = time, y = value, linetype = category)) +
geom_line() +
scale_linetype_vecshift(style = "basic")
} # }