scale_identityscale_colour_identity(name=NULL, breaks=NULL, labels=NULL, formatter=NULL, ...)
scale_fill_identity(name=NULL, breaks=NULL, labels=NULL, formatter=NULL, ...)
scale_size_identity(name=NULL, breaks=NULL, labels=NULL, formatter=NULL, ...)
scale_shape_identity(name=NULL, breaks=NULL, labels=NULL, formatter=NULL, ...)
scale_linetype_identity(name=NULL, breaks=NULL, labels=NULL, formatter=NULL, ...)
Use values without scaling
This page describes scale_identity, see layer and qplot for how to create a complete plot from individual components.
What do you think of the documentation? Please let me know by filling out this short online survey.
Parameters control the appearance of the scale. In addition to the parameters listed below (if any), any aesthetic can be used as a parameter, in which case it will override any aesthetic mapping.
name: name of scale to appear in legend or on axis. Maybe be an expression: see ?plotmathbreaks: numeric vector indicating where breaks should lielabels: character vector giving labels associated with breaksformatter: NULLThis function returns a scale object.
> colour <- c("red", "green", "blue", "yellow") > qplot(1:4, 1:4, fill = colour, geom = "tile")> qplot(1:4, 1:4, fill = colour, geom = "tile") + scale_fill_identity()
> > # To get a legend, you also need to supply the labels to > # be used on the legend > qplot(1:4, 1:4, fill = colour, geom = "tile") + + scale_fill_identity(labels = letters[1:4], name = "trt")
> > # cyl scaled to appropriate size > qplot(mpg, wt, data = mtcars, size = cyl)
> > # cyl used as point size > qplot(mpg, wt, data = mtcars, size = cyl) + scale_size_identity()
> NA
What do you think of the documentation? Please let me know by filling out this short online survey.