| scale_identity {ggplot2} | R Documentation |
Use values without scaling
scale_alpha_identity(name = NULL, breaks = NULL, labels = NULL,
formatter = NULL, legend = TRUE, ...)
name |
name of scale to appear in legend or on axis. Maybe be an expression: see ?plotmath |
breaks |
numeric vector indicating where breaks should lie |
labels |
character vector giving labels associated with breaks |
formatter |
NULL |
legend |
NULL |
... |
ignored |
This page describes scale\_identity, see layer and qplot for how to create a complete plot from individual components.
A layer
Hadley Wickham, http://had.co.nz/
## Not run:
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("trt", labels = letters[1:4], breaks = colour)
# 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()
## End(Not run)