scales v0.2.3


Monthly downloads



by Hadley Wickham

Scale functions for graphics.

Scales map data to aesthetics, and provide methods for automatically determining breaks and labels for axes and legends.

Functions in scales

Name Description
comma_format Comma formatter: format number with commas separating thousands.
hue_pal Hue palette (discrete).
atanh_trans Arc-tangent transformation.
alpha Modify colour transparency. Vectorised in both colour and alpha.
log_trans Log transformation.
as.trans Convert character string to transformer.
asn_trans Arc-sin square root transformation.
date_format Formatted dates.
brewer_pal Color Brewer palette (discrete).
dichromat_pal Dichromat (colour-blind) palette (discrete).
identity_pal Identity palette.
sqrt_trans Square-root transformation.
censor Censor any values outside of range.
extended_breaks Extended breaks. Uses Wilkinson's extended breaks algorithm as implemented in the labeling package.
col2hcl Modify standard R colour in hcl colour space.
package-scales Generic plot scaling methods
percent_format Percent formatter: multiply by one hundred and display percent sign.
grey_pal Grey scale palette (discrete).
rescale_pal Rescale palette (continuous).
trans_format Format labels after transformation.
log1p_trans Log plus one transformation.
cscale Continuous scale.
show_col Show colours.
date_trans Transformation for dates (class Date).
rescale_none Don't peform rescaling
exp_trans Exponential transformation (inverse of log transformation).
math_format Add arbitrary expression to a label. The symbol that will be replace by the label value is .x.
expand_range Expand a range with a multiplicative or additive constant.
boxcox_trans Box-Cox power transformation.
linetype_pal Line type palette (discrete).
identity_trans Identity transformation (do nothing).
dscale Discrete scale.
discard Discard any values outside of range.
time_trans Transformation for times (class POSIXt).
abs_area Point area palette (continuous), with area proportional to value.
muted Mute standard colour.
scientific_format Scientific formatter.
gradient_n_pal Arbitrary colour gradient palette (continous).
trans_breaks Pretty breaks on transformed scale.
cbreaks Compute breaks for continuous scale.
squish Squish values into range.
fullseq Generate sequence of fixed size intervals covering range.
shape_pal Shape palette (discrete).
squish_infinite Squish infinite values to range.
zero_range Determine if range of vector is close to zero, with a specified tolerance
parse_format Parse a text label to produce expressions for plotmath.
trans_new Create a new transformation object.
reverse_trans Reverse transformation.
seq_gradient_pal Sequential colour gradient palette (continous).
dollar_format Currency formatter: round to nearest cent and display dollar sign.
rescale_max Rescale numeric vector to have specified maximum.
date_breaks Regularly spaced dates.
log_breaks Log breaks (integer breaks on log-transformed scales).
probability_trans Probability transformation.
div_gradient_pal Diverging colour gradient (continous).
Range Mutable ranges.
format_format Format with using any arguments to format.
reciprocal_trans Reciprocal transformation.
pretty_breaks Pretty breaks. Uses default R break algorithm as implemented in pretty.
area_pal Point area palette (continuous).
manual_pal Manual palette (manual).
rescale Rescale numeric vector to have specified minimum and maximum.
rescale_mid Rescale numeric vector to have specified minimum, midpoint, and maximum.
trans_range Compute range of transformed values.
No Results!

Last month downloads


Type Package
License MIT
LazyLoad yes
Collate 'bounds.r' 'breaks.r' 'colour-manip.r' 'date-time.r' 'documentation.r' 'formatter.r' 'full-seq.r' 'pal-area.r' 'pal-brewer.r' 'pal-dichromat.r' 'pal-gradient.r' 'pal-grey.r' 'pal-hue.r' 'pal-identity.r' 'pal-linetype.r' 'pal-manual.r' 'pal-rescale.r' 'pal-shape.r' 'range.r' 'scale-continuous.r' 'scale-discrete.r' 'scales.r' 'trans-date.r' 'trans-numeric.r' 'trans.r'
BuildManual yes
Packaged 2012-12-04 23:13:23 UTC; hadley
Repository CRAN
Date/Publication 2012-12-05 13:11:38

Include our badge in your README