Learn R Programming

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

scales (version 0.2.4)

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

867,944

Version

0.2.4

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Hadley Wickham

Last Published

April 22nd, 2014

Functions in scales (0.2.4)

alpha

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

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

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

Sequential colour gradient palette (continous).
identity_trans

Identity transformation (do nothing).
trans_range

Compute range of transformed values.
log1p_trans

Log plus one transformation.
date_breaks

Regularly spaced dates.
parse_format

Parse a text label to produce expressions for plotmath.
cbreaks

Compute breaks for continuous scale.
rescale

Rescale numeric vector to have specified minimum and maximum.
discard

Discard any values outside of range.
rescale_mid

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

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

Square-root transformation.
atanh_trans

Arc-tangent transformation.
date_format

Formatted dates.
trans_breaks

Pretty breaks on transformed scale.
censor

Censor any values outside of range.
fullseq

Generate sequence of fixed size intervals covering range.
pretty_breaks

area_pal

Point area palette (continuous).
date_trans

Transformation for dates (class Date).
dscale

Discrete scale.
identity_pal

Identity palette.
cscale

Continuous scale.
log_trans

Log transformation.
scientific_format

Scientific formatter.
reciprocal_trans

Reciprocal transformation.
package-scales

Generic plot scaling methods
math_format

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

Convert character string to transformer.
dollar_format

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

Arbitrary colour gradient palette (continous).
trans_new

Create a new transformation object.
manual_pal

Manual palette (manual).
Range-class

Mutable ranges.
boxcox_trans

Box-Cox power transformation.
trans_format

Format labels after transformation.
rescale_pal

Rescale palette (continuous).
div_gradient_pal

Diverging colour gradient (continous).
col2hcl

Modify standard R colour in hcl colour space.
squish

Squish values into range.
linetype_pal

Line type palette (discrete).
exp_trans

Exponential transformation (inverse of log transformation).
grey_pal

Grey scale palette (discrete).
format_format

shape_pal

Shape palette (discrete).
asn_trans

Arc-sin square root transformation.
percent_format

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

Comma formatter: format number with commas separating thousands.
rescale_max

Rescale numeric vector to have specified maximum.
rescale_none

Don't peform rescaling
squish_infinite

Squish infinite values to range.
brewer_pal

Color Brewer palette (discrete).
muted

Mute standard colour.
hue_pal

Hue palette (discrete).
probability_trans

Probability transformation.
show_col

Show colours.
abs_area

Point area palette (continuous), with area proportional to value.
reverse_trans

Reverse transformation.
dichromat_pal

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

Expand a range with a multiplicative or additive constant.
time_trans

Transformation for times (class POSIXt).