scale_manual {ggplot2} | R Documentation |
Create your own discrete scale
scale_colour_manual(name=NULL, values=NULL, limits=NULL, breaks=NULL, labels=NULL, formatter=identity, ...) scale_fill_manual(name=NULL, values=NULL, limits=NULL, breaks=NULL, labels=NULL, formatter=identity, ...) scale_size_manual(name=NULL, values=NULL, limits=NULL, breaks=NULL, labels=NULL, formatter=identity, ...) scale_shape_manual(name=NULL, values=NULL, limits=NULL, breaks=NULL, labels=NULL, formatter=identity, ...) scale_linetype_manual(name=NULL, values=NULL, limits=NULL, breaks=NULL, labels=NULL, formatter=identity, ...)
name |
name of scale to appear in legend or on axis. Maybe be an expression: see ?plotmath |
values |
NULL |
limits |
numeric vector of length 2, giving the extent of the scale |
breaks |
numeric vector indicating where breaks should lie |
labels |
character vector giving labels associated with breaks |
formatter |
NULL |
... |
ignored |
This page describes scale_manual, see layer
and qplot
for how to create a complete plot from individual components.
A layer
Hadley Wickham, http://had.co.nz/
## Not run: p <- qplot(mpg, wt, data=mtcars, colour=factor(cyl)) p + scale_colour_manual(values = c("red","blue", "green")) p + scale_colour_manual(values = c("8" = "red","4" = "blue","6" = "green")) ## End(Not run)