cleanplots shape and linetype scales for ggplot2
Source:R/scale_shape_cleanplots.R
scale_shape_cleanplots.RdDiscrete shape and linetype scales matching the marker symbols and
line patterns of the Stata cleanplots scheme. Combined with
scale_color_cleanplots(), these make
series distinguishable even when printed in black & white or viewed
with colorblindness: markers alternate hollow (dark colors) and solid
(light colors) shapes, and series that share a line pattern always
differ strongly in lightness.
Arguments
- ...
Additional arguments passed to
ggplot2::scale_shape_manual()orggplot2::scale_linetype_manual().
Examples
library(ggplot2)
ggplot(iris, aes(Sepal.Length, Sepal.Width,
color = Species, shape = Species)) +
geom_point(size = 2) +
theme_cleanplots() +
scale_color_cleanplots() +
scale_shape_cleanplots()
ggplot(economics_long, aes(date, value01,
color = variable, linetype = variable)) +
geom_line() +
theme_cleanplots() +
scale_color_cleanplots() +
scale_linetype_cleanplots()