Skip to contents

Discrete 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.

Usage

scale_shape_cleanplots(...)

scale_linetype_cleanplots(...)

Arguments

...

Additional arguments passed to ggplot2::scale_shape_manual() or ggplot2::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()