Repository navigation
Accepted on CRAN 2026-11-07: https://CRAN.R-project.org/package=ggCheysson. The main change: each element of each color-and-pattern palette is now a
'ggpattern' pattern of its own, a swatch, so a whole palette needs only aes(pattern = x) and
scale_cheysson(). New show_swatches() draws them all. Thanks to Trevor L. Davis (ggpattern / gridpattern)
for the pattern-registration API and advice.
Works with the current CRAN versions of ggpattern / gridpattern and with their upcoming versions; see
?cheysson_swatches for what pattern_spacing / pattern_density mean in each.
ggCheysson 1.2.0
New features
-
Experimental: each element of each pattern palette is now a ggpattern pattern of its own, a
swatch, named"<palette>-<element>"(e.g."1886_28-1"), that draws its fill, hatch type, line
colors and angle together. A whole color-and-pattern palette then needs onlyaes(pattern = x)
and a pattern scale, e.g.scale_pattern_manual(values = paste0("1886_28-", 1:6)): no
aes_cheysson(), and nopattern_spacing/pattern_densityarguments. The swatches are
registered when gridpattern loads, withgridpattern::register_pattern()where available.
What settingpattern_spacing/pattern_densitymeans depends on the ggpattern version; see
?cheysson_swatches. -
The swatches of a palette keep the relative line spacings measured on Cheysson's plates, so
e.g. the hatching of sequential palette1888_27gets denser at each step.pattern_spacing
sets the spacing of a palette's typical swatch, and the others keep their proportions. The
literacy map in the Guerry maps vignette now usesscale_cheysson()instead of mapping
pattern_spacingwithscale_pattern_spacing_manual(). -
New
show_swatches()draws an atlas of the swatches: one row per palette and one column per
element, grouped by palette type, so a swatch's name reads off its row and column. It is shown
in the README. -
Experimental
scale_cheysson()is now a single discrete scale for thepatternaesthetic that
gives each level a swatch, so a palette needs only
aes(pattern = x) + geom_col_pattern() + scale_cheysson("1886_28"). It used to return five
scales, one per pattern aesthetic. Itsaestheticsargument is ignored, with a warning; to use
only some of a palette's properties, use the individualscale_*_cheysson()scales.na.value
is now a pattern (default"none", which shows the geom's ownfill) rather than a color.
aes_cheysson(x)is deprecated and now the same asaes(pattern = x), so existing code using
both keeps working. The "Combining Colors and Patterns" vignette is updated. -
The package's discrete scales no longer pass
scale_nametoggplot2::discrete_scale()with
ggplot2 3.5.0 or later, where it is deprecated.
Bug fixes
-
The palette functions and scales (
cheysson_pal(),cheysson_pattern(),scale_fill_cheysson(),
scale_cheysson(), etc.) andcheysson_name()failed with "object 'cheysson_palettes' not found"
(or'cheysson_patterns','cheysson_labels') unless ggCheysson was attached withlibrary(), e.g.
when called asggCheysson::scale_fill_cheysson()or from another package. They now find the
palette data either way. -
cheysson_pattern_params()used%||%, which base R has only from 4.4.0, so it failed on the
earlier R versions the package supports (R >= 3.5). The package now has its own.
