Skip to content

scales

1.4.0Package record

Scale Functions for Visualization

1,060packages dependsuggested by 445
20.6Mdownloads / year
82.7%test coverage
11/13flavors OK

Overview

About

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

Changes in 1.4.0
  • Range training now supports custom classes. Continuous classes require a range() method that returns numeric values. Discrete classes require a levels() method (and optionally a droplevels() method) (#480).
  • New label_glue() labelling function for interpolated strings (#457).
  • fullseq() and by extension breaks_width() can now deal with unsorted ranges (#435).
  • New label_date_short(leading) argument to replace leading zeroes (#442)
  • breaks_pretty() will return the input limit when it has no range (#446)
  • breaks_exp() now provides more sensible breaks for the exponential transform
  • transform_exp() now has more sensible breaks, available in breaks_exp() (@teunbrand, #405).
  • The scales package now keeps track of known palettes. These can be retrieved using get_palette() or registered using set_palette() (#396).
Show all changes in 1.4.0Hide the rest of the changes in 1.4.0
  • label_log() has a signed argument for displaying negative numbers (@teunbrand, #421).
  • New label_dictionary() for named lookup of labels (#458).
  • New function compose_label() to chain together label formatting functions (#462)
  • Palette function now have classes, attributes and coercion methods (@teunbrand, #426).
  • Added colour manipulation functions: col_shift(), col_saturate(), col_darker(), col_lighter() and col_mix() (@teunbrand, #423)
  • label_date_short() gains tz and locale argument (#478)

From NEWS.md in the release

Install

Health

CRAN checks
2NOTE11OK
Check messages
NOTEDESCRIPTION meta-informationr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Author field differs from that derived from Authors@R
  Author:    ‘Hadley Wickham [aut], Thomas Lin Pedersen [cre, aut] (<https://orcid.org/0000-0002-5147-4711>), Dana Seidel [aut], Posit Software, PBC [cph, fnd] (03wc8by49)’
  Authors@R: ‘Hadley Wickham [aut], Thomas Lin Pedersen [cre, aut] (ORCID: <https://orcid.org/0000-0002-5147-4711>), Dana Seidel [aut], Posit Software, PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>)’
Additional issues

CRAN check page ↗

Slowest check: 2.8 min · r-oldrel-windows-x86_64
Status changes
  • NOTE11 OK, 2 NOTE2026-06-09
  • WARNING11 OK, 1 NOTE, 1 WARNING2026-06-08
  • ERROR11 OK, 1 NOTE, 1 ERROR2026-06-07
  • NOTE12 OK, 2 NOTE2026-03-10
Advisories

none known

Documentation

In release 1.4.0
READMEYes · 227 wordsVignettesNoNEWSYes · 100% structured · mentions 1.4.0Citation fileNoWebsiteYes · pkgdown

The repository also keeps web-only articles.

Help pages
101 (26 internal)includes a package overview page
Examples that run
100%69 run in a plain check (2 of them under a condition)
Exported functions with examples
70%
Documented parameters
93%
Return-value docs
33%
Help pages citing references
5%

Downloads

20.6M
CRAN downloads in the past year
Rank #19 · ~56.3K/day · ~1.7M/mo
Daily download trend is not available in this view yet.
1.5M30 days
4.6M90 days
20.6M1 year
Compare downloads with other packages →
Also on183.9K r2u212 autocran1.7M conda_forge1.5K bioconda24.1K c2d4u

Repository

r-lib/scales ↗Organization: r-lib
452Stars
120Forks
25Open issues
11Open PRs
13Releases
750Commits
62Commit identities
rggplot2
750 commits · Last activity 2026-10-06 · +0.9% stars, 30d · Default branch at 1.4.0.9000, ahead of CRAN 1.4.0 (checked 2026-10-21)
Responsiveness
How these are sampled
PRs merged (all time)
81%
Median days to close, 50 most recently updated closed issues
135
Median days to close, 50 most recently updated closed PRs
18

Stars over time

2025-10-13 · 4372026-10-16 · 452
PracticesBeta

15 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/r-lib/scales on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (2)
Code of conductCODEOWNERS
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-06 · The repository has a site deploy workflow

pkgdown site last built 2025-04-24

Coverage (2)
Coverage reporting (Codecov).covrignore
Show all practicesHide 2 practices
CRAN release process (2)
cran-comments.mdrevdep/
Lint, format, editor (3)
AirVS CodeRStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
16 external dependencies (excludes base and recommended)

Installing scales adds 9 packages (4 with compiled code, 4.1 MB of source tarballs). Heaviest: farver 1.2 MB, viridisLite 1.2 MB, rlang 766 KB.

Depends (1)
R >= 4.1
LinkingTo (0)
none
Enhances (0)
none

People & History

People (4)
Maintainer since 1.3.0 (2023), Author · added in 1.3.0
Author · added in 1.1.0
Copyright holder, Funder · added in 1.4.0

Previously maintained by Hadley Wickham (0.1.0 to 1.2.1).

Listed in earlier versions (2)
RStudio
no longer listed · 0.2.5 to 1.2.1
Posit, PBC
no longer listed · 1.3.0
Releases (23)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • R
    R 3.4.0 released · 2017-04-21
  • R
    R 3.3.0 released · 2016-05-03
  • R
    R 3.2.0 released · 2015-04-16
  • R
    R 3.1.0 released · 2014-04-10
  • R
    R 3.0.0 released · 2013-04-03
  • 2.15.3Latest
    record
    2012-12-04 · current release · diff ↗ ·
    added 2 exports
    abs_area, rescale_max
  • 2.15.2
    record
    2012-09-03 · diff ↗
Show 24 earlier eventsHide 24 earlier events
  • 2.15.1
    record
    2012-05-08 · diff ↗
  • R
    R 2.15.0 released · 2012-03-30
  • 2.14.2
    record
    2012-02-27 · diff ↗
  • R
    R 2.14.0 released · 2011-10-31
  • 2.13.2
    record
    2011-09-19 · diff ↗ ·
    added 70 exports
    alpha, area_pal, as.trans, asn_trans, atanh_trans, boxcox_trans, brewer_pal, cbreaks, censor, col2hcl, comma_format, comma, ContinuousRange, cscale, date_breaks, date_format, date_trans, dichromat_pal, discard, DiscreteRange, div_gradient_pal, dollar_format, dollar, dscale, exp_trans, expand_range, format_format, fullseq, gradient_n_pal, grey_pal and 40 more
  • 1.4.0
    record
    2025-04-24 · diff ↗ ·
    added 24 exports
    as_continuous_pal, as_discrete_pal, breaks_exp, col_darker, col_lighter, col_mix, col_saturate, col_shift, compose_label, format_log, is_colour_pal, is_continuous_pal, is_discrete_pal, is_numeric_pal, is_pal, label_dictionary, label_glue, minor_breaks_log, new_continuous_palette, new_discrete_palette, number_options, palette_na_safe, palette_nlevels, palette_type
  • 1.3.0
    record
    2023-11-28 · diff ↗ ·
    added 49 exports
    as.transform, asinh_trans, breaks_timespan, cut_time_scale, demo_timespan, is.transform, label_currency, label_timespan, new_transform, pal_area, pal_brewer, pal_dichromat, pal_div_gradient, pal_gradient_n, pal_grey, pal_hue, pal_identity, pal_linetype, pal_manual, pal_rescale, pal_seq_gradient, pal_shape, pal_viridis, timespan_trans, transform_asinh, transform_asn, transform_atanh, transform_boxcox, transform_compose, transform_date and 19 more
  • 1.2.1
    record
    2022-08-20 · diff ↗
  • 1.2.0
    record
    2022-04-14 · diff ↗ ·
    added 5 exports
    compose_trans, cut_long_scale, cut_short_scale, cut_si, label_log
  • 1.1.1
    record
    2020-05-12 · diff ↗ ·
    added 8 exports
    demo_time, oob_censor, oob_censor_any, oob_discard, oob_keep, oob_squish, oob_squish_any, oob_squish_infinite
  • 1.1.0
    record
    2019-11-18 · diff ↗ ·
    added 28 exports
    Range, breaks_extended, breaks_log, breaks_pretty, breaks_width, demo_continuous, demo_datetime, demo_discrete, demo_log10, label_bytes, label_comma, label_date, label_date_short, label_dollar, label_math, label_number, label_number_auto, label_number_si, label_ordinal, label_parse, label_percent, label_pvalue, label_scientific, label_time, label_wrap, minor_breaks_n, minor_breaks_width, yj_trans
  • 1.0.0
    record
    2018-08-09 · diff ↗ ·
    added 12 exports
    modulus_trans, number, number_bytes, number_bytes_format, number_format, ordinal_english, ordinal_french, ordinal_spanish, pseudo_log_trans, pvalue, pvalue_format, time_format
  • 0.5.0
    record
    2017-08-24 · diff ↗ ·
    added 2 exports
    regular_minor_breaks, viridis_pal
  • 0.4.1
    record
    2016-11-09 · diff ↗ ·
    added 1 export
    hms_trans
  • 0.4.0
    record
    2016-02-26 · diff ↗
  • 0.3.0
    record
    2015-08-25 · diff ↗ ·
    added 2 exports
    train_continuous, train_discrete
  • 0.2.5
    record
    2015-06-12 · diff ↗ ·
    added 9 exports
    col_bin, col_factor, col_numeric, col_quantile, colour_ramp, ordinal, ordinal_format, unit_format, wrap_format
  • 0.2.4
    record
    2014-04-22 · diff ↗
  • 0.2.3
    record
    2012-12-05 · diff ↗
  • 0.2.2
    record
    2012-09-04 · diff ↗
  • 0.2.1
    record
    2012-05-08 · diff ↗ ·
    added 1 export
    extended_breaks
  • 0.2.0
    record
    2012-02-27 · diff ↗
  • 0.1.0
    record
    2011-09-22
  • R
    R 2.13.0 released · 2011-04-13

Package metadata

First published
2011-09-19
Total releases
23 / 15 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1
Download size
321 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("scales")
Pedersen, T. L., Posit Software, PBC, Seidel, D., & Wickham, H. (2025). scales: Scale Functions for Visualization (Version 1.4.0) [Computer software]. https://doi.org/10.32614/CRAN.package.scales

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for scales version 1.4.0 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy