sclinetype {ggplot} | R Documentation |
Create a scale for categorical line types.
sclinetype(plot = .PLOT, name="")
plot |
plot to add scale to |
name |
name of the scale (used in the legend) |
This scale is automatically added to the plot when you use the linetype aesthetic. As there are no options to this scale, you shouldn't ever need to add it yourself.
Hadley Wickham <h.wickham@gmail.com>
scale_categorical
, map_linetype
p <- ggplot(mtcars, aes=list(x=mpg, y=wt, linetype=cyl)) ggline(p) ggline(sclinetype(p))