scale_identity {ggplot2}R Documentation

scale\_identity

Description

Use values without scaling

Usage

scale_alpha_identity(name = NULL, breaks = NULL, labels = NULL, 
    formatter = NULL, legend = TRUE, ...)

Arguments

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

Details

This page describes scale\_identity, see layer and qplot for how to create a complete plot from individual components.

Value

A layer

Author(s)

Hadley Wickham, http://had.co.nz/

See Also

Examples

## 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)

[Package ggplot2 version 0.8.9 Index]