| Title: | Graphic Styles of Emile Cheysson for 'ggplot2' |
|---|---|
| Description: | Implements for 'ggplot2' the stylistic elements (fonts, hatched patterns, color palettes) used by 'Emile Cheysson' in the 'Albums de Statistique Graphique', sometimes called the pinnacle of the Golden Age of Statistical Graphics. |
| Authors: | Michael Friendly [aut, cre] (ORCID: <https://orcid.org/0000-0002-3237-0941>), RJ Andrews [ctb], Tom Shanley [ctb], Kenneth Fields [ctb] |
| Maintainer: | Michael Friendly <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.0.0 |
| Built: | 2026-05-14 05:53:48 UTC |
| Source: | https://github.com/friendly/ggCheysson |
Metadata linking the 25 color palettes from the Albums de Statistique Graphique to their corresponding album years, plate numbers, and David Rumsey collection reference numbers.
albumImagesalbumImages
A data frame with 25 rows and 6 variables:
Advent calendar day number (1-25) from original digitization
David Rumsey Map Collection list number
Year of the album (1880-1906)
Plate number within the album
Palette type: "Sequential", "Diverging", "Grouped", or "Category"
URL to the digitized image in the David Rumsey Map Collection
This dataset provides the mapping between the original SVG pattern files (named by Advent calendar days by RJ Andrews) and the actual album years and plate numbers from the Albums de Statistique Graphique.
The naming convention "adventDay" comes from RJ Andrews' original digitization project where he released one palette per day during December as an Advent calendar. The package uses the Album year and plate number for more intuitive palette naming (e.g., "1880_07" instead of "dec06").
David Rumsey Map Collection: https://www.davidrumsey.com/
RJ Andrews Album Colors: https://github.com/infowetrust/albumcolors
Tom Shanley Observable: https://observablehq.com/@tomshanley/cheysson-color-palettes
cheysson_palettes, cheysson_patterns
# View the dataset head(albumImages) # Find information about a specific album subset(albumImages, Album == 1880) # Count palettes by type table(albumImages$Type) # Get the Rumsey link for a specific palette albumImages[albumImages$Album == 1881 & albumImages$Qty == 3, "link"]# View the dataset head(albumImages) # Find information about a specific album subset(albumImages, Album == 1880) # Count palettes by type table(albumImages$Type) # Get the Rumsey link for a specific palette albumImages[albumImages$Album == 1881 & albumImages$Qty == 3, "link"]
Returns the appropriate Cheysson font family name for a given purpose.
cheysson_font(type = c("regular", "italic", "sans", "outline", "title"))cheysson_font(type = c("regular", "italic", "sans", "outline", "title"))
type |
Font type: "regular", "italic", "sans", "outline", or "title" |
Character string with font family name
cheysson_font("title") # Returns "CheyssonTitle" cheysson_font("regular") # Returns "Cheysson"cheysson_font("title") # Returns "CheyssonTitle" cheysson_font("regular") # Returns "Cheysson"
Metadata about the five Cheysson font families included in the package, describing their characteristics and recommended uses.
cheysson_fontscheysson_fonts
A data frame with 5 rows and 4 variables:
Font family name (e.g., "Cheysson", "CheyssonTitle")
Brief description of the font style
Recommended use cases for the font
TrueType font filename in the inst/fonts/ directory
The package includes five hand-drawn font families created by Kenneth Fields (ESRI) to match the lettering style of the original Albums de Statistique Graphique:
Cheysson: Regular serif font suitable for body text, axis labels, and legends
CheyssonItalic: Italic variant for emphasis and annotations
CheyssonSansCaps: Sans-serif capitals for axis labels and category names
CheyssonOutlineCaps: Outlined capitals for decorative plot titles and headings
CheyssonTitle: Decorative font for main plot titles
These fonts must be loaded before use with load_cheysson_fonts.
The Cheysson themes (theme_cheysson, etc.) automatically select
appropriate fonts for different plot elements.
Font families created by Kenneth Fields (ESRI) based on the lettering style of Émile Cheysson's Albums de Statistique Graphique.
load_cheysson_fonts, cheysson_fonts_available,
theme_cheysson
# View font metadata cheysson_fonts # Get recommended uses cheysson_fonts[, c("family", "use")] # Find the title font subset(cheysson_fonts, grepl("title", use, ignore.case = TRUE))# View font metadata cheysson_fonts # Get recommended uses cheysson_fonts[, c("family", "use")] # Find the title font subset(cheysson_fonts, grepl("title", use, ignore.case = TRUE))
Checks whether Cheysson fonts have been registered and are available for use.
cheysson_fonts_available(method = NULL)cheysson_fonts_available(method = NULL)
method |
Check for "systemfonts" or "showtext". If NULL (default), checks both methods. |
Logical indicating whether fonts are available
if (cheysson_fonts_available()) { message("Cheysson fonts are ready to use!") }if (cheysson_fonts_available()) { message("Cheysson fonts are ready to use!") }
Returns colors from a specified Cheysson palette. Palettes can be referenced by name (e.g., "1880_07") or by selecting a palette of a particular type.
cheysson_pal(palette = "1880_07", n = NULL, type = 1)cheysson_pal(palette = "1880_07", n = NULL, type = 1)
palette |
Name of palette (e.g., "1880_07"), or palette type ("sequential", "diverging", "grouped", "category"). If a type is specified, the first palette of that type is returned. |
n |
Number of colors to return. If NULL, returns all colors in the palette. If n is greater than the number of colors in the palette, colors will be interpolated. |
type |
If palette is a type name, optionally specify which palette of that type to use (default is 1 for the first). |
A character vector of hex color codes
# Get all colors from a specific palette cheysson_pal("1880_07") # Get 5 colors from a palette cheysson_pal("1880_07", n = 5) # Get colors from first sequential palette cheysson_pal("sequential") # Get colors from second category palette cheysson_pal("category", type = 2)# Get all colors from a specific palette cheysson_pal("1880_07") # Get 5 colors from a palette cheysson_pal("1880_07", n = 5) # Get colors from first sequential palette cheysson_pal("sequential") # Get colors from second category palette cheysson_pal("category", type = 2)
Color palettes extracted from the Albums de Statistique Graphique produced under the direction of Émile Cheysson. These palettes are organized by album year and plate number.
cheysson_palettescheysson_palettes
A list of 20 color palettes, each containing:
Character vector of hex color codes
Palette type: "sequential", "diverging", "grouped", or "category"
Year of the album
Plate number within the album
David Rumsey collection reference number
Advent calendar day from original source
The palettes are named using the convention YYYY_PP where YYYY is the
album year and PP is the zero-padded plate number. For example, "1880_07"
refers to plate 7 from the 1880 album.
Palette types:
Sequential (7 palettes): Ordered colors for quantitative data
Diverging (2 palettes): Two contrasting colors with neutral midpoint
Grouped (5 palettes): Related colors for comparing groups
Category (6 palettes): Distinct colors for categorical data
Color patterns digitized by RJ Andrews from the David Rumsey Map Collection https://github.com/infowetrust/albumcolors
Observable implementation by Tom Shanley https://observablehq.com/@tomshanley/cheysson-color-palettes
cheysson_pal, scale_color_cheysson
# List available palettes names(cheysson_palettes) # Get colors from a specific palette cheysson_palettes$`1880_07`$colors # Find palettes by type sequential_pals <- Filter(function(x) x$type == "sequential", cheysson_palettes) names(sequential_pals)# List available palettes names(cheysson_palettes) # Get colors from a specific palette cheysson_palettes$`1880_07`$colors # Find palettes by type sequential_pals <- Filter(function(x) x$type == "sequential", cheysson_palettes) names(sequential_pals)
Returns pattern specifications from a Cheysson palette for use with ggpattern.
cheysson_pattern(palette = "1881_03", n = NULL, type = 1)cheysson_pattern(palette = "1881_03", n = NULL, type = 1)
palette |
Name of palette (e.g., "1881_03") or palette type ("sequential", "diverging", "grouped", "category"). |
n |
Number of patterns to return. If NULL, returns all patterns. |
type |
If palette is a type name, which palette of that type to use (default 1). |
A list of pattern specifications suitable for ggpattern
# Get all patterns from a palette cheysson_pattern("1881_03") # Get first 3 patterns cheysson_pattern("1881_03", n = 3) # Get patterns from a sequential palette cheysson_pattern("sequential")# Get all patterns from a palette cheysson_pattern("1881_03") # Get first 3 patterns cheysson_pattern("1881_03", n = 3) # Get patterns from a sequential palette cheysson_pattern("sequential")
Converts Cheysson pattern specifications to parameters suitable for ggpattern geoms.
cheysson_pattern_params(patterns, param = "fill")cheysson_pattern_params(patterns, param = "fill")
patterns |
List of pattern specifications from cheysson_pattern() |
param |
Which parameter to extract: "type", "fill", "pattern_fill", "pattern_angle", "pattern_density", "pattern_spacing", or "pattern_type" |
Vector of parameter values
patterns <- cheysson_pattern("1881_03") cheysson_pattern_params(patterns, "fill") cheysson_pattern_params(patterns, "pattern_angle")patterns <- cheysson_pattern("1881_03") cheysson_pattern_params(patterns, "fill") cheysson_pattern_params(patterns, "pattern_angle")
Pattern specifications (fills and hatching) extracted from the Albums de Statistique Graphique. These patterns combine solid colors with line hatching (stripes and crosshatching) as used in Cheysson's maps.
cheysson_patternscheysson_patterns
A list of 20 pattern palettes, each containing:
List of pattern specifications with fill colors and hatching parameters
Palette type: "sequential", "diverging", "grouped", or "category"
Year of the album
Plate number within the album
David Rumsey collection reference number
Advent calendar day from original source
Number of patterns in the palette
Each pattern specification includes:
type: "solid", "stripe", or "crosshatch"
fill: Base fill color
pattern_fill: Color for pattern lines
pattern_angle: Angle of stripes (in degrees)
pattern_density: Density of pattern lines (0-1)
pattern_spacing: Spacing between pattern lines
pattern_linewidth: Width of pattern lines
Pattern specifications digitized from the David Rumsey Map Collection
cheysson_pattern, scale_pattern_fill_cheysson
# List available pattern palettes names(cheysson_patterns) # Get patterns from a specific palette cheysson_patterns$`1881_03`# List available pattern palettes names(cheysson_patterns) # Get patterns from a specific palette cheysson_patterns$`1881_03`
Returns information about available Cheysson color palettes, optionally filtered by type.
list_cheysson_pals(type = NULL)list_cheysson_pals(type = NULL)
type |
Optional palette type to filter by: "sequential", "diverging", "grouped", or "category". If NULL (default), returns all palettes. |
A data frame with columns: name, type, album, plate, n_colors
# List all palettes list_cheysson_pals() # List only sequential palettes list_cheysson_pals("sequential") # List only category palettes list_cheysson_pals("category")# List all palettes list_cheysson_pals() # List only sequential palettes list_cheysson_pals("sequential") # List only category palettes list_cheysson_pals("category")
Returns information about available Cheysson pattern palettes.
list_cheysson_patterns(type = NULL)list_cheysson_patterns(type = NULL)
type |
Optional palette type to filter by: "sequential", "diverging", "grouped", or "category". If NULL (default), returns all palettes. |
A data frame with columns: name, type, album, plate, n_patterns
# List all pattern palettes list_cheysson_patterns() # List only sequential palettes list_cheysson_patterns("sequential")# List all pattern palettes list_cheysson_patterns() # List only sequential palettes list_cheysson_patterns("sequential")
Registers the Cheysson font families for use in plots. This function should be called before using Cheysson fonts in ggplot2.
load_cheysson_fonts(method = c("systemfonts", "showtext"))load_cheysson_fonts(method = c("systemfonts", "showtext"))
method |
Font loading method: "systemfonts" (default) or "showtext". systemfonts is recommended for most uses. showtext is useful for saving plots to files. |
The package includes five Cheysson font families:
Cheysson: Regular serif font for body text
CheyssonItalic: Italic variant
CheyssonSansCaps: Sans-serif capitals
CheyssonOutlineCaps: Outlined capitals for titles
CheyssonTitle: Decorative font for titles
When using showtext, you must call showtext::showtext_auto() before
creating plots, and showtext::showtext_auto(FALSE) when done.
Windows users: The systemfonts method works for saved plots (with ragg) but custom fonts won't appear in the on-screen plot window. For on-screen preview with fonts:
Use method = "showtext" instead, or
In RStudio: Tools > Global Options > General > Graphics > Backend: "AGG"
For saving plots with systemfonts, use ggsave(..., device = ragg::agg_png).
Invisibly returns a character vector of loaded font family names
# Load fonts (default method) load_cheysson_fonts() # Use in a plot library(ggplot2) p <- ggplot(mtcars, aes(wt, mpg)) + geom_point() + labs(title = "Using Cheysson Fonts") + theme( text = element_text(family = "Cheysson"), plot.title = element_text(family = "CheyssonTitle") ) # Save to temporary file tmp <- tempfile(fileext = ".png") if (requireNamespace("ragg", quietly = TRUE)) { ggsave(tmp, p, device = ragg::agg_png) } else { ggsave(tmp, p) } unlink(tmp)# Load fonts (default method) load_cheysson_fonts() # Use in a plot library(ggplot2) p <- ggplot(mtcars, aes(wt, mpg)) + geom_point() + labs(title = "Using Cheysson Fonts") + theme( text = element_text(family = "Cheysson"), plot.title = element_text(family = "CheyssonTitle") ) # Save to temporary file tmp <- tempfile(fileext = ".png") if (requireNamespace("ragg", quietly = TRUE)) { ggsave(tmp, p, device = ragg::agg_png) } else { ggsave(tmp, p) } unlink(tmp)
Color and fill scales using Cheysson palettes from the Albums de Statistique Graphique.
scale_color_cheysson( palette = "1880_07", discrete = TRUE, reverse = FALSE, ... ) scale_colour_cheysson( palette = "1880_07", discrete = TRUE, reverse = FALSE, ... ) scale_fill_cheysson(palette = "1880_07", discrete = TRUE, reverse = FALSE, ...)scale_color_cheysson( palette = "1880_07", discrete = TRUE, reverse = FALSE, ... ) scale_colour_cheysson( palette = "1880_07", discrete = TRUE, reverse = FALSE, ... ) scale_fill_cheysson(palette = "1880_07", discrete = TRUE, reverse = FALSE, ...)
palette |
Name of palette (e.g., "1880_07") or palette type ("sequential", "diverging", "grouped", "category"). Default is "1880_07". |
discrete |
Whether to use a discrete (TRUE) or continuous (FALSE) scale. Default is TRUE. |
reverse |
Whether to reverse the palette colors. Default is FALSE. |
... |
Additional arguments passed to ggplot2 scale functions |
A ggplot2 scale object that can be added to a plot. For discrete scales, returns a discrete_scale object. For continuous scales, returns a continuous scale object (gradient).
library(ggplot2) # Discrete color scale ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + geom_point() + scale_color_cheysson() # Use a specific palette ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + geom_point() + scale_color_cheysson(palette = "1881_04") # Use a sequential palette for continuous data ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Petal.Length)) + geom_point() + scale_color_cheysson(palette = "sequential", discrete = FALSE) # Fill scale with category colors ggplot(iris, aes(Species, Sepal.Width, fill = Species)) + geom_boxplot() + scale_fill_cheysson(palette = "category")library(ggplot2) # Discrete color scale ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + geom_point() + scale_color_cheysson() # Use a specific palette ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + geom_point() + scale_color_cheysson(palette = "1881_04") # Use a sequential palette for continuous data ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Petal.Length)) + geom_point() + scale_color_cheysson(palette = "sequential", discrete = FALSE) # Fill scale with category colors ggplot(iris, aes(Species, Sepal.Width, fill = Species)) + geom_boxplot() + scale_fill_cheysson(palette = "category")
Convenience function that applies the base fill color from Cheysson patterns. Use in combination with pattern_* scales for full pattern effect.
scale_fill_cheysson_pattern(palette = "1881_03", reverse = FALSE, ...)scale_fill_cheysson_pattern(palette = "1881_03", reverse = FALSE, ...)
palette |
Name of palette (e.g., "1881_03") or palette type ("sequential", "diverging", "grouped", "category"). Default is "1881_03". |
reverse |
Whether to reverse the pattern order. Default is FALSE. |
... |
Additional arguments passed to ggplot2 scale functions |
A ggplot2 discrete scale object for the fill aesthetic. Applies the base fill colors from Cheysson patterns.
# Requires ggpattern package if (requireNamespace("ggpattern", quietly = TRUE)) { library(ggplot2) library(ggpattern) data <- data.frame( category = LETTERS[1:4], value = c(15, 23, 18, 20) ) ggplot(data, aes(category, value, fill = category)) + geom_col_pattern(aes(pattern_type = category), pattern = "stripe") + scale_fill_cheysson_pattern("category") + scale_pattern_type_cheysson("category") + theme_minimal() }# Requires ggpattern package if (requireNamespace("ggpattern", quietly = TRUE)) { library(ggplot2) library(ggpattern) data <- data.frame( category = LETTERS[1:4], value = c(15, 23, 18, 20) ) ggplot(data, aes(category, value, fill = category)) + geom_col_pattern(aes(pattern_type = category), pattern = "stripe") + scale_fill_cheysson_pattern("category") + scale_pattern_type_cheysson("category") + theme_minimal() }
Pattern fill scales using Cheysson patterns from the Albums de Statistique Graphique. These scales work with ggpattern geoms to apply both colors and hatching patterns.
scale_pattern_fill_cheysson(palette = "1881_03", reverse = FALSE, ...) scale_pattern_type_cheysson(palette = "1881_03", reverse = FALSE, ...) scale_pattern_angle_cheysson(palette = "1881_03", reverse = FALSE, ...) scale_pattern_density_cheysson(palette = "1881_03", reverse = FALSE, ...)scale_pattern_fill_cheysson(palette = "1881_03", reverse = FALSE, ...) scale_pattern_type_cheysson(palette = "1881_03", reverse = FALSE, ...) scale_pattern_angle_cheysson(palette = "1881_03", reverse = FALSE, ...) scale_pattern_density_cheysson(palette = "1881_03", reverse = FALSE, ...)
palette |
Name of palette (e.g., "1881_03") or palette type ("sequential", "diverging", "grouped", "category"). Default is "1881_03". |
reverse |
Whether to reverse the pattern order. Default is FALSE. |
... |
Additional arguments passed to ggplot2 scale functions |
These scales require the ggpattern package. Use with ggpattern geoms like
geom_col_pattern(), geom_bar_pattern(), etc.
The scales apply multiple pattern aesthetics simultaneously:
fill: Base fill color
pattern_type: Type of pattern (none, stripe, crosshatch)
pattern_fill: Color of pattern lines
pattern_angle: Angle of stripes
pattern_density: Density of pattern lines
A ggplot2 discrete scale object for the specified pattern aesthetic (pattern_fill, pattern_type, pattern_angle, or pattern_density). These scales apply the historically accurate Cheysson patterns to ggpattern geoms.
# Requires ggpattern package if (requireNamespace("ggpattern", quietly = TRUE)) { library(ggplot2) library(ggpattern) # Basic bar chart with patterns data <- data.frame( category = LETTERS[1:4], value = c(15, 23, 18, 20) ) ggplot(data, aes(category, value, fill = category)) + geom_col_pattern( aes( pattern_type = category, pattern_fill = category, pattern_angle = category ), pattern = "stripe", pattern_density = 0.3, color = "black" ) + scale_pattern_fill_cheysson("category") + scale_pattern_type_cheysson("category") + scale_pattern_angle_cheysson("category") + theme_minimal() }# Requires ggpattern package if (requireNamespace("ggpattern", quietly = TRUE)) { library(ggplot2) library(ggpattern) # Basic bar chart with patterns data <- data.frame( category = LETTERS[1:4], value = c(15, 23, 18, 20) ) ggplot(data, aes(category, value, fill = category)) + geom_col_pattern( aes( pattern_type = category, pattern_fill = category, pattern_angle = category ), pattern = "stripe", pattern_density = 0.3, color = "black" ) + scale_pattern_fill_cheysson("category") + scale_pattern_type_cheysson("category") + scale_pattern_angle_cheysson("category") + theme_minimal() }
Creates a visual display of a color palette showing color swatches along with their hex codes. This is useful for documentation, presentations, and exploring the available palettes.
show_palette(palette = "1880_07", n = NULL, show_info = TRUE, cex = 1)show_palette(palette = "1880_07", n = NULL, show_info = TRUE, cex = 1)
palette |
Name of palette (e.g., "1880_07"), or palette type ("sequential", "diverging", "grouped", "category"). |
n |
Number of colors to display. If NULL (default), shows all colors in the palette. If specified, will interpolate if n > palette size. |
show_info |
Logical; if TRUE (default), displays palette metadata (type, album, plate) above the swatches. |
cex |
Text size multiplier for hex codes (default 1). |
Invisibly returns a character vector of the displayed hex codes. The function is called primarily for its side effect of creating a plot.
## Not run: # Display a specific palette show_palette("1880_07") # Display palette without metadata show_palette("1881_03", show_info = FALSE) # Display 10 interpolated colors show_palette("1895_04", n = 10) # Display first sequential palette show_palette("sequential") ## End(Not run)## Not run: # Display a specific palette show_palette("1880_07") # Display palette without metadata show_palette("1881_03", show_info = FALSE) # Display 10 interpolated colors show_palette("1895_04", n = 10) # Display first sequential palette show_palette("sequential") ## End(Not run)
Creates a visual display of multiple color palettes, useful for comparing palettes or showing all palettes of a certain type.
show_palettes(palettes = NULL, ncol = 1, cex = 0.8)show_palettes(palettes = NULL, ncol = 1, cex = 0.8)
palettes |
Character vector of palette names. If NULL (default), shows all palettes. Can also be a palette type ("sequential", "diverging", "grouped", "category") to show all palettes of that type. |
ncol |
Number of columns for layout (default 1). |
cex |
Text size multiplier (default 0.8). |
Invisibly returns NULL. The function is called for its side effect of creating a plot.
## Not run: # Show all sequential palettes show_palettes("sequential") # Show specific palettes show_palettes(c("1880_07", "1881_03", "1895_04")) ## End(Not run)## Not run: # Show all sequential palettes show_palettes("sequential") # Show specific palettes show_palettes(c("1880_07", "1881_03", "1895_04")) ## End(Not run)
A ggplot2 theme inspired by the visual style of the Albums de Statistique Graphique, using Cheysson fonts and appropriate styling.
theme_cheysson( base_size = 11, base_family = "auto", title_family = "auto", axis_title_family = "auto", load_fonts = TRUE )theme_cheysson( base_size = 11, base_family = "auto", title_family = "auto", axis_title_family = "auto", load_fonts = TRUE )
base_size |
Base font size (default: 11) |
base_family |
Base font family. If "auto" (default), uses Cheysson if available, otherwise falls back to sans-serif |
title_family |
Font family for titles (default: "auto") |
axis_title_family |
Font family for axis titles (default: "auto") |
load_fonts |
Automatically load Cheysson fonts if not already loaded (default: TRUE) |
This theme applies the following styling:
Cheysson fonts for all text elements
Minimal grid lines
Classic axis styling
Subtle colors matching historical aesthetics
Font selection:
Plot title: CheyssonTitle (decorative)
Axis titles: CheyssonSansCaps (capitals)
Body text: Cheysson (regular)
A ggplot2 theme object
## Not run: library(ggplot2) # Load fonts first (required for proper rendering) load_cheysson_fonts() # Basic usage ggplot(mtcars, aes(wt, mpg)) + geom_point() + labs(title = "Automobile Statistics") + theme_cheysson() # With Cheysson color palette ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + geom_point(size = 3) + scale_color_cheysson("1881_04") + theme_cheysson() ## End(Not run)## Not run: library(ggplot2) # Load fonts first (required for proper rendering) load_cheysson_fonts() # Basic usage ggplot(mtcars, aes(wt, mpg)) + geom_point() + labs(title = "Automobile Statistics") + theme_cheysson() # With Cheysson color palette ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + geom_point(size = 3) + scale_color_cheysson("1881_04") + theme_cheysson() ## End(Not run)
A theme specifically designed for maps, with no grid and minimal elements, in the style of Cheysson's cartographic works.
theme_cheysson_map( base_size = 11, base_family = "auto", title_family = "auto", load_fonts = TRUE )theme_cheysson_map( base_size = 11, base_family = "auto", title_family = "auto", load_fonts = TRUE )
base_size |
Base font size (default: 11) |
base_family |
Base font family. If "auto" (default), uses Cheysson if available, otherwise falls back to sans-serif |
title_family |
Font family for titles (default: "auto") |
load_fonts |
Automatically load Cheysson fonts if not already loaded (default: TRUE) |
A ggplot2 theme object that can be added to a plot with +.
## Not run: # For use with spatial data/maps library(ggplot2) # Load fonts first load_cheysson_fonts() # Example with spatial data (requires sf package) if (requireNamespace("sf", quietly = TRUE)) { # ggplot(map_data) + geom_sf() + theme_cheysson_map() } ## End(Not run)## Not run: # For use with spatial data/maps library(ggplot2) # Load fonts first load_cheysson_fonts() # Example with spatial data (requires sf package) if (requireNamespace("sf", quietly = TRUE)) { # ggplot(map_data) + geom_sf() + theme_cheysson_map() } ## End(Not run)
A more minimal version of theme_cheysson with fewer grid lines, suitable for maps and diagrams.
theme_cheysson_minimal( base_size = 11, base_family = "auto", title_family = "auto", axis_title_family = "auto", load_fonts = TRUE )theme_cheysson_minimal( base_size = 11, base_family = "auto", title_family = "auto", axis_title_family = "auto", load_fonts = TRUE )
base_size |
Base font size (default: 11) |
base_family |
Base font family. If "auto" (default), uses Cheysson if available, otherwise falls back to sans-serif |
title_family |
Font family for titles (default: "auto") |
axis_title_family |
Font family for axis titles (default: "auto") |
load_fonts |
Automatically load Cheysson fonts if not already loaded (default: TRUE) |
A ggplot2 theme object that can be added to a plot with +.
## Not run: library(ggplot2) # Load fonts first load_cheysson_fonts() ggplot(mtcars, aes(wt, mpg)) + geom_point() + theme_cheysson_minimal() ## End(Not run)## Not run: library(ggplot2) # Load fonts first load_cheysson_fonts() ggplot(mtcars, aes(wt, mpg)) + geom_point() + theme_cheysson_minimal() ## End(Not run)