Skip to contents

Discrete shape scale that automatically assigns shapes from ospShapeNames in order based on the number of factor levels. Equivalent to ggplot2::scale_shape().

If there are more levels than available shapes, shapes are recycled and a warning is issued.

Usage

scale_shape_osp(...)

Arguments

...

Passed to ggplot2::discrete_scale.

Value

A ggplot2 scale that can be added to a plot.

Examples

library(ggplot2)
df <- data.frame(x = 1:3, y = 1:3, group = c("A", "B", "C"))
ggplot(df, aes(x, y, shape = group)) +
  geom_point_osp(size = 4) +
  scale_shape_osp()