Learn R Programming

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

scales (version 0.2.2)

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

1,256,373

Version

0.2.2

License

MIT

Maintainer

Hadley Wickham

Last Published

September 4th, 2012

Functions in scales (0.2.2)

censor

Censor any values outside of range.
hue_pal

Hue palette (discrete).
gradient_n_pal

Arbitrary colour gradient palette (continous).
alpha

Modify colour transparency. Vectorised in both colour and alpha.
as.trans

Convert character string to transformer.
col2hcl

Modify standard R colour in hcl colour space.
manual_pal

Manual palette (manual).
log_breaks

Log breaks (integer breaks on log-transformed scales).
exp_trans

Exponential transformation (inverse of log transformation).
format_format

discard

Discard any values outside of range.
parse_format

Parse a text label to produce expressions for plotmath.
date_format

Formatted dates.
comma_format

Comma formatter: format number with commas separating thousands.
identity_trans

Identity transformation (do nothing).
show_col

Show colours.
asn_trans

Arc-sin square root transformation.
identity_pal

Identity palette.
extended_breaks

Extended breaks. Uses Wilkinson's extended breaks algorithm as implemented in the labeling package.
time_trans

Transformation for times (class POSIXt).
date_breaks

Regularly spaced dates.
dollar_format

Currency formatter: round to nearest cent and display dollar sign.
zero_range

Determine if range of vector is close to zero, with a specified tolerance
probability_trans

Probability transformation.
rescale

Rescale numeric vector to have specified minimum and maximum.
cbreaks

Compute breaks for continuous scale.
dichromat_pal

Dichromat (colour-blind) palette (discrete).
squish_infinite

Squish infinite values to range.
cscale

Continuous scale.
date_trans

Transformation for dates (class Date).
trans_new

Create a new transformation object.
rescale_none

Don't peform rescaling
rescale_pal

Rescale palette (continuous).
brewer_pal

Color Brewer palette (discrete).
squish

Squish values into range.
expand_range

Expand a range with a multiplicative or additive constant.
area_pal

Point area palette (continuous).
trans_format

Format labels after transformation.
fullseq

Generate sequence of fixed size intervals covering range.
linetype_pal

Line type palette (discrete).
pretty_breaks

log1p_trans

Log plus one transformation.
log_trans

Log transformation.
trans_breaks

Pretty breaks on transformed scale.
shape_pal

Shape palette (discrete).
grey_pal

Grey scale palette (discrete).
div_gradient_pal

Diverging colour gradient (continous).
muted

Mute standard colour.
boxcox_trans

Box-Cox power transformation.
atanh_trans

Arc-tangent transformation.
package-scales

Generic plot scaling methods
dscale

Discrete scale.
reciprocal_trans

Reciprocal transformation.
scientific_format

Scientific formatter.
rescale_mid

Rescale numeric vector to have specified minimum, midpoint, and maximum.
sqrt_trans

Square-root transformation.
Range

Mutable ranges.
reverse_trans

Reverse transformation.
seq_gradient_pal

Sequential colour gradient palette (continous).
trans_range

Compute range of transformed values.
percent_format

Percent formatter: multiply by one hundred and display percent sign.
math_format

Add arbitrary expression to a label. The symbol that will be replace by the label value is .x.