scale_continuous {ggplot}R Documentation

Scale: general continuous (incl. transformations)

Description

Transform scale with a monotone function

Usage

scale_continuous(variable="x", name="", transform=trans_none, range=c(NA,NA), expand=c(0, 0), breaks=NULL, to=NULL, ...)

Arguments

variable variable name
name name of the scale (used in the legend)
transform vector of length two, first element the transforming function and the second its inverse
range range of values to display on guides
expand expansion factor for guides
breaks manually specified breaks to use
to if non-null, scale variable to this range after transformation
...

Details

You shouldn't call this function yourself. Please use one of:

  • scsize
  • scgradient
  • pscontinuous

    The continuous scale is the most complicated of the scale functions as it accepts so many options.

    Making pretty axis labels for transformed data isn't a trivial problem. Here I use a simple heuristic, and compute pretty breaks on the transformed range and then back transform to the original scale.

    There are a few common transformation vectors defined: trans_log10, trans_log2, trans_sqrt, trans_inverse

    Value

    modified plot object

    Author(s)

    Hadley Wickham <h.wickham@gmail.com>


    [Package ggplot version 0.4.2 Index]