scale_identity {ggplot2}R Documentation

scale_identity

Description

Use values without scaling

Usage

scale_colour_identity(name=NULL, breaks=NULL, labels=NULL, ...)
scale_fill_identity(name=NULL, breaks=NULL, labels=NULL, ...)
scale_size_identity(name=NULL, breaks=NULL, labels=NULL, ...)
scale_shape_identity(name=NULL, breaks=NULL, labels=NULL, ...)
scale_linetype_identity(name=NULL, breaks=NULL, labels=NULL, ...)

Arguments

name name of scale to appear in legend or on axis
breaks numeric vector indicating where breaks should lie
labels character vector giving labels associated with breaks
... 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(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()
  
## End(Not run)

[Package ggplot2 version 0.7 Index]