Declare the scale for a mapped (discrete) shape aesthetic. Levels cycle
through a default set of marker shapes unless values is given. A shape legend
is drawn automatically.
Arguments
- plot
A PlotSpec.
- values
Character vector of shapes (each one of
"circle","square","triangle","diamond","plus","cross"), orNULLfor the default.- name
Legend title, or
NULLto derive from the encoding.
Value
The modified PlotSpec.
Examples
vplot(mtcars) |> mark_point(x = wt, y = mpg, shape = factor(cyl))
