Learn R Programming

⚠️There's a newer version (1.4.0) of this package.Take me there.

scales (version 0.2.3)

Scale functions for graphics.

Description

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

Copy Link

Version

Install

install.packages('scales')

Monthly Downloads

900,345

Version

0.2.3

License

MIT

Maintainer

Hadley Wickham

Last Published

December 5th, 2012

Functions in scales (0.2.3)

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

reciprocal_trans

Reciprocal transformation.
pretty_breaks

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.