Learn R Programming

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

scales (version 0.2.1)

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,215,552

Version

0.2.1

License

MIT

Maintainer

Hadley Wickham

Last Published

May 8th, 2012

Functions in scales (0.2.1)

brewer_pal

Color Brewer palette (discrete).
area_pal

Point area palette (continuous).
exp_trans

Exponential transformation (inverse of log transformation).
manual_pal

Manual palette (manual).
log1p_trans

Log plus one transformation.
sqrt_trans

Square-root transformation.
scientific_format

Scientific formatter.
cscale

Continuous scale.
trans_new

Create a new transformation object.
trans_format

Format labels after transformation.
zero_range

Determine if range of vector is FP 0.
dollar_format

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

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

Line type palette (discrete).
dichromat_pal

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

Box-Cox power transformation.
identity_pal

Identity palette.
seq_gradient_pal

Sequential colour gradient palette (continous).
grey_pal

Grey scale palette (discrete).
comma_format

Comma formatter: format number with commas separating thousands.
expand_range

Expand a range with a multiplicative or additive constant.
rescale_pal

Rescale palette (continuous).
cbreaks

Compute breaks for continuous scale.
extended_breaks

Extended breaks. Uses Wilkinon's extended breaks algorithm as implemented in the labeling package.
reverse_trans

Reverse transformation.
alpha

Modify colour transparency. Vectorised in both colour and alpha.
atanh_trans

Arc-tangent transformation.
date_format

Formatted dates.
censor

Censor any values outside of range.
col2hcl

Modify standard R colour in hcl colour space.
date_breaks

Regularly spaced dates.
hue_pal

Hue palette (discrete).
gradient_n_pal

Arbitrary colour gradient palette (continous).
squish_infinite

Squish infinite values to range.
squish

Squish values into range.
dscale

Discrete scale.
fullseq

Generate sequence of fixed size intervals covering range.
show_col

Show colours.
package-scales

Generic plot scaling methods
parse_format

Parse a text label to produce expressions for plotmath.
date_trans

Transformation for dates (class Date).
probability_trans

Probability transformation.
trans_range

Compute range of transformed values.
pretty_breaks

rescale

Rescale numeric vector to have specified minimum and maximum.
time_trans

Transformation for times (class POSIXt).
reciprocal_trans

Reciprocal transformation.
discard

Discard any values outside of range.
identity_trans

Identity transformation (do nothing).
asn_trans

Arc-sin square root transformation.
log_trans

Log transformation.
as.trans

Convert character string to transformer.
format_format

Range

Mutable ranges.
rescale_none

Don't peform rescaling
trans_breaks

Pretty breaks on transformed scale.
log_breaks

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

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

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

Mute standard colour.
div_gradient_pal

Diverging colour gradient (continous).
shape_pal

Shape palette (discrete).