Browse Source

Added Eau Sans and Clear Sans

master
boB Rudis 5 months ago
parent
commit
c649aa1607
No known key found for this signature in database GPG Key ID: 8537655849E43141
  1. 6
      DESCRIPTION
  2. 3
      NAMESPACE
  3. 3
      NEWS.md
  4. 73
      R/check-register-install.R
  5. 33
      R/install-fonts.R
  6. 127
      R/theme-cs.R
  7. 127
      R/theme-eau.R
  8. BIN
      inst/fonts/clear-sans/ClearSans-Bold.ttf
  9. BIN
      inst/fonts/clear-sans/ClearSans-BoldItalic.ttf
  10. BIN
      inst/fonts/clear-sans/ClearSans-Italic.ttf
  11. BIN
      inst/fonts/clear-sans/ClearSans-Light.ttf
  12. BIN
      inst/fonts/clear-sans/ClearSans-Medium.ttf
  13. BIN
      inst/fonts/clear-sans/ClearSans-MediumItalic.ttf
  14. BIN
      inst/fonts/clear-sans/ClearSans-Regular.ttf
  15. BIN
      inst/fonts/clear-sans/ClearSans-Thin.ttf
  16. BIN
      inst/fonts/eau-sans/eau_sans_black.otf
  17. BIN
      inst/fonts/eau-sans/eau_sans_black_obl.otf
  18. BIN
      inst/fonts/eau-sans/eau_sans_bold.otf
  19. BIN
      inst/fonts/eau-sans/eau_sans_bold_obl.otf
  20. BIN
      inst/fonts/eau-sans/eau_sans_book.otf
  21. BIN
      inst/fonts/eau-sans/eau_sans_book_obl.otf
  22. 35
      man/install_clean_sans.Rd
  23. 120
      man/theme_cs.Rd
  24. 120
      man/theme_eau.Rd

6
DESCRIPTION

@ -2,8 +2,8 @@ Package: hrbragg
Type: Package
Title: Typography-centric Themes, Theme Components, and Utilities
for 'ggplot2' and 'ragg'.
Version: 0.2.2
Date: 2021-07-10
Version: 0.3.0
Date: 2021-12-22
Authors@R: c(
person(
given = "Bob",
@ -41,4 +41,4 @@ Imports:
rstudioapi,
magrittr
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
RoxygenNote: 7.1.2

3
NAMESPACE

@ -6,6 +6,7 @@ export(elb)
export(ell)
export(elr)
export(elt)
export(install_clean_sans)
export(install_goldman_sans)
export(install_goldman_sans_condensed)
export(install_inter)
@ -18,6 +19,8 @@ export(scale_x_percent)
export(scale_y_comma)
export(scale_y_percent)
export(theme_background_color)
export(theme_cs)
export(theme_eau)
export(theme_foreground_color)
export(theme_gs)
export(theme_inter)

3
NEWS.md

@ -1,3 +1,6 @@
0.3.0
* Added Eau Sans and Clear Sans fonts/themes
0.2.2
* title/subtitle/caption are now `ggtext::element_textbox_simple()`
* minor margin tweaks

73
R/check-register-install.R

@ -16,6 +16,7 @@ register_reconfig <- function(family,
inst_f,
font_dir,
width = "normal",
has_tnum = TRUE,
ligatures = NULL,
letters = NULL,
numbers = NULL,
@ -43,24 +44,41 @@ register_reconfig <- function(family,
startup_msg("Registering '", family, "' font variant.")
reconfigure_font(
prefix = "hrbragg-pkg tab",
family = family,
width = width,
ligatures = ligatures,
tnum = 1, ...
) -> has_tnum
reconfigure_font(
prefix = "hrbragg-pkg prop",
family = family,
width = width,
ligatures = "discretionary",
tnum = 0, ...
) -> no_tnum
if (has_tnum) {
reconfigure_font(
prefix = "hrbragg-pkg tab",
family = family,
width = width,
ligatures = ligatures,
tnum = 1,
...
) -> has_tnum
reconfigure_font(
prefix = "hrbragg-pkg prop",
family = family,
width = width,
ligatures = "discretionary",
tnum = 0,
...
) -> no_tnum
assign(sprintf("%s_pkg", glob_prefix), has_tnum, .GlobalEnv)
assign(sprintf("%s_pkg_prop", glob_prefix), no_tnum, .GlobalEnv)
} else {
reconfigure_font(
prefix = "hrbragg-pkg prop",
family = family,
width = width,
ligatures = "discretionary",
...
) -> no_tnum
assign(sprintf("%s_pkg", glob_prefix), no_tnum, .GlobalEnv)
assign(sprintf("%s_pkg", glob_prefix), has_tnum, .GlobalEnv)
assign(sprintf("%s_pkg_prop", glob_prefix), no_tnum, .GlobalEnv)
}
}
@ -107,6 +125,27 @@ register_fonts <- function() {
kern = 1
)
register_reconfig(
family = "Clear Sans",
glob_prefix = "clear_sans",
inst_f = "install_clear_sans()",
font_dir = "clear-sans",
width = "normal",
ligatures = "standard",
kern = 1,
has_tnum = FALSE
)
register_reconfig(
family = "Eau",
glob_prefix = "eau_sans",
inst_f = "install_eau_sans()",
font_dir = "eau-sans",
width = "normal",
ligatures = "standard",
has_tnum = FALSE
)
startup_msg(
"Use `options(hrbragg.verbose = FALSE)` to silence font registration messages"
)

33
R/install-fonts.R

@ -50,6 +50,39 @@ install_goldman_sans <- function() {
install_font("Goldman Sans", "goldman-sans")
}
#' Install Clear Sans
#'
#' Clear Sans has minimized, unambiguous characters and slightly narrow proportions, making it
#' ideal for UI design. Its strong, recognizable forms avoid distracting ambiguity, making it
#' comfortable for reading short UI labels and long passages in both screen and print.
#'
#' @export
#' @note [Clear Sans Font License](https://github.com/intel/clear-sans/blob/main/LICENSE.txt)
#' @references [Clean Sans](https://github.com/intel/clear-sans)
#' @examples
#' install_clean_sans()
install_clean_sans <- function() {
install_font("Clean Sans", "clean-sans")
}
#' Install Eau Sans
#'
#' Eau Sans is (via the creator): "In 1992, I wanted to design a perfectly faceless typeface of my own.
#' I chose Eau, meaning water in French, as the name. I planned to do two variations; a sanserif and
#' a Roman serif style version. I could not decide on the design details for the Roman variation,
#' so only the sanserif version was completed. Although I think that Eau Sans needs more refinement,
#' present it here as it was originally designed. At the time of release, I re-formatted the Eau Sans
#' family with numeric characters in three variations: proportional, lining and old-styled figures.
#' This typeface is used for my electronic sound project: parabola."
#'
#' @export
#' @references [Eau Sans](http://www.yoworks.com/eau/index.html)
#' @examples
#' install_clean_sans()
install_clean_sans <- function() {
install_font("Eau Sans", "eau-sans")
}
#' @rdname install_goldman_sans
#' @export
install_goldman_sans_condensed <- function() {

127
R/theme-cs.R

@ -0,0 +1,127 @@
#' ggplot2 Theme Based On The Clear Sans Font Family
#'
#' Uses the built-in [clear_sans_pkg] custom font.
#'
#' - `background_colour` dark mode is "`#121212`" else "`white`"
#' - `foreground_colour` dark mode is "`#e1e1e1`" else "`#262626`"
#' - `grid_col` dark mode is "`#606367`" else "`#cccccc`"
#' - `axis_col` dark mode is "`#606367`" else "`#2b2b2b`"
#'
#' @note this function updates `Geom` defaults; use [reset_ggplot2_defaults()] to
#' restore ggplot2 geom default aeshetics
#' @param base_size base font size
#' @param line_height default line height
#' @param plot_title_size plot title size
#' @param plot_title_position plot title position
#' @param plot_title_margin plot title margin
#' @param subtitle_size subtitle size
#' @param subtitle_margin subtitle margin
#' @param strip_text_size strip text size
#' @param strip_placement strip placement
#' @param caption_size caption size
#' @param caption_margin caption margin
#' @param axis_text_size axis text size
#' @param axis_title_size axis title size
#' @param axis_title_just axis title just
#' @param text_geom_size text geom size
#' @param panel_spacing panel spacing
#' @param plot_margin plot margin
#' @param grid_col grid col
#' @param grid grid
#' @param axis_col axis col
#' @param axis axis
#' @param axis_text axis text labels
#' @param ticks ticks
#' @return ggplot2 theme
#' @export
#' @examples
#' ggplot() +
#' geom_point(
#' data = mtcars,
#' aes(mpg, wt)
#' ) +
#' geom_label(
#' aes(
#' x = 30, y = 4.5,
#' label = "A fairly useless\nannotation that\nuses the custom\nClear Sans variant\nby default."
#' ),
#' label.size = 0
#' ) +
#' labs(
#' x = "Fuel efficiency (mpg)", y = "Weight (tons)",
#' title = "Seminal ggplot2 scatterplot example",
#' subtitle = "A plot that is only useful for demonstration purposes",
#' caption = "Brought to you by the letter 'g'"
#' ) +
#' theme_cs(grid = "XY")
theme_cs <- function(
base_size = 10,
line_height = 0.875,
plot_title_size = 18,
plot_title_position = "panel",
plot_title_margin = 8,
subtitle_size = 12,
subtitle_margin = 10,
strip_text_size = 12,
strip_placement = "outer",
caption_size = 9,
caption_margin = 11,
axis_text_size = base_size,
axis_title_size = 9,
axis_title_just = "rt",
panel_spacing = grid::unit(2, "lines"),
plot_margin = margin(30, 30, 30, 30),
mode = c("light", "dark", "rstudio"),
background_colour = theme_background_color(mode, light = "white", dark = "#121212"),
foreground_colour = theme_foreground_color(mode, light = "#262626", dark = "#e1e1e1"),
grid_col = theme_foreground_color(mode, light = "#cccccc", dark = "#606367"),
axis_col = theme_foreground_color(mode, light = "#2b2b2b", dark = "#606367"),
grid = TRUE,
axis = FALSE,
axis_text = TRUE,
ticks = FALSE) {
base_family <- clear_sans_pkg$normal
plot_title_family <- clear_sans_pkg$bold
subtitle_family <- clear_sans_pkg$normal
strip_text_family <- clear_sans_pkg$bold
axis_text_family <- clear_sans_pkg$normal
caption_family <- clear_sans_pkg$normal
axis_title_family <- clear_sans_pkg$normal
finish_theme(
base_size = base_size,
line_height = line_height,
plot_title_size = plot_title_size,
plot_title_position = plot_title_position,
plot_title_margin = plot_title_margin,
subtitle_size = subtitle_size,
subtitle_margin = subtitle_margin,
strip_text_size = strip_text_size,
strip_placement = strip_placement,
caption_size = caption_size,
caption_margin = caption_margin,
axis_text_size = axis_text_size,
axis_title_size = axis_title_size,
axis_title_just = axis_title_just,
panel_spacing = panel_spacing,
plot_margin = plot_margin,
mode = mode,
background_colour = background_colour,
foreground_colour = foreground_colour,
grid_col = grid_col,
axis_col = axis_col,
grid = grid,
axis = axis,
axis_text = axis_text,
ticks = ticks,
base_family = base_family,
plot_title_family = plot_title_family,
subtitle_family = subtitle_family,
strip_text_family = strip_text_family,
axis_text_family = axis_text_family,
caption_family = caption_family,
axis_title_family = axis_title_family
)
}

127
R/theme-eau.R

@ -0,0 +1,127 @@
#' ggplot2 Theme Based On The Eau Sans Font Family
#'
#' Uses the built-in [clear_sans_pkg] custom font.
#'
#' - `background_colour` dark mode is "`#121212`" else "`white`"
#' - `foreground_colour` dark mode is "`#e1e1e1`" else "`#262626`"
#' - `grid_col` dark mode is "`#606367`" else "`#cccccc`"
#' - `axis_col` dark mode is "`#606367`" else "`#2b2b2b`"
#'
#' @note this function updates `Geom` defaults; use [reset_ggplot2_defaults()] to
#' restore ggplot2 geom default aeshetics
#' @param base_size base font size
#' @param line_height default line height
#' @param plot_title_size plot title size
#' @param plot_title_position plot title position
#' @param plot_title_margin plot title margin
#' @param subtitle_size subtitle size
#' @param subtitle_margin subtitle margin
#' @param strip_text_size strip text size
#' @param strip_placement strip placement
#' @param caption_size caption size
#' @param caption_margin caption margin
#' @param axis_text_size axis text size
#' @param axis_title_size axis title size
#' @param axis_title_just axis title just
#' @param text_geom_size text geom size
#' @param panel_spacing panel spacing
#' @param plot_margin plot margin
#' @param grid_col grid col
#' @param grid grid
#' @param axis_col axis col
#' @param axis axis
#' @param axis_text axis text labels
#' @param ticks ticks
#' @return ggplot2 theme
#' @export
#' @examples
#' ggplot() +
#' geom_point(
#' data = mtcars,
#' aes(mpg, wt)
#' ) +
#' geom_label(
#' aes(
#' x = 30, y = 4.5,
#' label = "A fairly useless\nannotation that\nuses the custom\nEau Sans variant\nby default."
#' ),
#' label.size = 0
#' ) +
#' labs(
#' x = "Fuel efficiency (mpg)", y = "Weight (tons)",
#' title = "Seminal ggplot2 scatterplot example",
#' subtitle = "A plot that is only useful for demonstration purposes",
#' caption = "Brought to you by the letter 'g'"
#' ) +
#' theme_cs(grid = "XY")
theme_eau <- function(
base_size = 10,
line_height = 0.875,
plot_title_size = 18,
plot_title_position = "panel",
plot_title_margin = 8,
subtitle_size = 12,
subtitle_margin = 10,
strip_text_size = 12,
strip_placement = "outer",
caption_size = 9,
caption_margin = 11,
axis_text_size = base_size,
axis_title_size = 9,
axis_title_just = "rt",
panel_spacing = grid::unit(2, "lines"),
plot_margin = margin(30, 30, 30, 30),
mode = c("light", "dark", "rstudio"),
background_colour = theme_background_color(mode, light = "white", dark = "#121212"),
foreground_colour = theme_foreground_color(mode, light = "#262626", dark = "#e1e1e1"),
grid_col = theme_foreground_color(mode, light = "#cccccc", dark = "#606367"),
axis_col = theme_foreground_color(mode, light = "#2b2b2b", dark = "#606367"),
grid = TRUE,
axis = FALSE,
axis_text = TRUE,
ticks = FALSE) {
base_family <- eau_sans_pkg$normal
plot_title_family <- eau_sans_pkg$heavy_italic
subtitle_family <- eau_sans_pkg$normal
strip_text_family <- eau_sans_pkg$bold
axis_text_family <- eau_sans_pkg$normal
caption_family <- eau_sans_pkg$normal
axis_title_family <- eau_sans_pkg$normal
finish_theme(
base_size = base_size,
line_height = line_height,
plot_title_size = plot_title_size,
plot_title_position = plot_title_position,
plot_title_margin = plot_title_margin,
subtitle_size = subtitle_size,
subtitle_margin = subtitle_margin,
strip_text_size = strip_text_size,
strip_placement = strip_placement,
caption_size = caption_size,
caption_margin = caption_margin,
axis_text_size = axis_text_size,
axis_title_size = axis_title_size,
axis_title_just = axis_title_just,
panel_spacing = panel_spacing,
plot_margin = plot_margin,
mode = mode,
background_colour = background_colour,
foreground_colour = foreground_colour,
grid_col = grid_col,
axis_col = axis_col,
grid = grid,
axis = axis,
axis_text = axis_text,
ticks = ticks,
base_family = base_family,
plot_title_family = plot_title_family,
subtitle_family = subtitle_family,
strip_text_family = strip_text_family,
axis_text_family = axis_text_family,
caption_family = caption_family,
axis_title_family = axis_title_family
)
}

BIN
inst/fonts/clear-sans/ClearSans-Bold.ttf

Binary file not shown.

BIN
inst/fonts/clear-sans/ClearSans-BoldItalic.ttf

Binary file not shown.

BIN
inst/fonts/clear-sans/ClearSans-Italic.ttf

Binary file not shown.

BIN
inst/fonts/clear-sans/ClearSans-Light.ttf

Binary file not shown.

BIN
inst/fonts/clear-sans/ClearSans-Medium.ttf

Binary file not shown.

BIN
inst/fonts/clear-sans/ClearSans-MediumItalic.ttf

Binary file not shown.

BIN
inst/fonts/clear-sans/ClearSans-Regular.ttf

Binary file not shown.

BIN
inst/fonts/clear-sans/ClearSans-Thin.ttf

Binary file not shown.

BIN
inst/fonts/eau-sans/eau_sans_black.otf

Binary file not shown.

BIN
inst/fonts/eau-sans/eau_sans_black_obl.otf

Binary file not shown.

BIN
inst/fonts/eau-sans/eau_sans_bold.otf

Binary file not shown.

BIN
inst/fonts/eau-sans/eau_sans_bold_obl.otf

Binary file not shown.

BIN
inst/fonts/eau-sans/eau_sans_book.otf

Binary file not shown.

BIN
inst/fonts/eau-sans/eau_sans_book_obl.otf

Binary file not shown.

35
man/install_clean_sans.Rd

@ -0,0 +1,35 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/install-fonts.R
\name{install_clean_sans}
\alias{install_clean_sans}
\title{Install Clear Sans}
\usage{
install_clean_sans()
install_clean_sans()
}
\description{
Clear Sans has minimized, unambiguous characters and slightly narrow proportions, making it
ideal for UI design. Its strong, recognizable forms avoid distracting ambiguity, making it
comfortable for reading short UI labels and long passages in both screen and print.
Eau Sans is (via the creator): "In 1992, I wanted to design a perfectly faceless typeface of my own.
I chose Eau, meaning water in French, as the name. I planned to do two variations; a sanserif and
a Roman serif style version. I could not decide on the design details for the Roman variation,
so only the sanserif version was completed. Although I think that Eau Sans needs more refinement,
present it here as it was originally designed. At the time of release, I re-formatted the Eau Sans
family with numeric characters in three variations: proportional, lining and old-styled figures.
This typeface is used for my electronic sound project: parabola."
}
\note{
\href{https://github.com/intel/clear-sans/blob/main/LICENSE.txt}{Clear Sans Font License}
}
\examples{
install_clean_sans()
install_clean_sans()
}
\references{
\href{https://github.com/intel/clear-sans}{Clean Sans}
\href{http://www.yoworks.com/eau/index.html}{Eau Sans}
}

120
man/theme_cs.Rd

@ -0,0 +1,120 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/theme-cs.R
\name{theme_cs}
\alias{theme_cs}
\title{ggplot2 Theme Based On The Clear Sans Font Family}
\usage{
theme_cs(
base_size = 10,
line_height = 0.875,
plot_title_size = 18,
plot_title_position = "panel",
plot_title_margin = 8,
subtitle_size = 12,
subtitle_margin = 10,
strip_text_size = 12,
strip_placement = "outer",
caption_size = 9,
caption_margin = 11,
axis_text_size = base_size,
axis_title_size = 9,
axis_title_just = "rt",
panel_spacing = grid::unit(2, "lines"),
plot_margin = margin(30, 30, 30, 30),
mode = c("light", "dark", "rstudio"),
background_colour = theme_background_color(mode, light = "white", dark = "#121212"),
foreground_colour = theme_foreground_color(mode, light = "#262626", dark = "#e1e1e1"),
grid_col = theme_foreground_color(mode, light = "#cccccc", dark = "#606367"),
axis_col = theme_foreground_color(mode, light = "#2b2b2b", dark = "#606367"),
grid = TRUE,
axis = FALSE,
axis_text = TRUE,
ticks = FALSE
)
}
\arguments{
\item{base_size}{base font size}
\item{line_height}{default line height}
\item{plot_title_size}{plot title size}
\item{plot_title_position}{plot title position}
\item{plot_title_margin}{plot title margin}
\item{subtitle_size}{subtitle size}
\item{subtitle_margin}{subtitle margin}
\item{strip_text_size}{strip text size}
\item{strip_placement}{strip placement}
\item{caption_size}{caption size}
\item{caption_margin}{caption margin}
\item{axis_text_size}{axis text size}
\item{axis_title_size}{axis title size}
\item{axis_title_just}{axis title just}
\item{panel_spacing}{panel spacing}
\item{plot_margin}{plot margin}
\item{grid_col}{grid col}
\item{axis_col}{axis col}
\item{grid}{grid}
\item{axis}{axis}
\item{axis_text}{axis text labels}
\item{ticks}{ticks}
\item{text_geom_size}{text geom size}
}
\value{
ggplot2 theme
}
\description{
Uses the built-in \link{clear_sans_pkg} custom font.
}
\details{
\itemize{
\item \code{background_colour} dark mode is "\verb{#121212}" else "\code{white}"
\item \code{foreground_colour} dark mode is "\verb{#e1e1e1}" else "\verb{#262626}"
\item \code{grid_col} dark mode is "\verb{#606367}" else "\verb{#cccccc}"
\item \code{axis_col} dark mode is "\verb{#606367}" else "\verb{#2b2b2b}"
}
}
\note{
this function updates \code{Geom} defaults; use \code{\link[=reset_ggplot2_defaults]{reset_ggplot2_defaults()}} to
restore ggplot2 geom default aeshetics
}
\examples{
ggplot() +
geom_point(
data = mtcars,
aes(mpg, wt)
) +
geom_label(
aes(
x = 30, y = 4.5,
label = "A fairly useless\nannotation that\nuses the custom\nClear Sans variant\nby default."
),
label.size = 0
) +
labs(
x = "Fuel efficiency (mpg)", y = "Weight (tons)",
title = "Seminal ggplot2 scatterplot example",
subtitle = "A plot that is only useful for demonstration purposes",
caption = "Brought to you by the letter 'g'"
) +
theme_cs(grid = "XY")
}

120
man/theme_eau.Rd

@ -0,0 +1,120 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/theme-eau.R
\name{theme_eau}
\alias{theme_eau}
\title{ggplot2 Theme Based On The Eau Sans Font Family}
\usage{
theme_eau(
base_size = 10,
line_height = 0.875,
plot_title_size = 18,
plot_title_position = "panel",
plot_title_margin = 8,
subtitle_size = 12,
subtitle_margin = 10,
strip_text_size = 12,
strip_placement = "outer",
caption_size = 9,
caption_margin = 11,
axis_text_size = base_size,
axis_title_size = 9,
axis_title_just = "rt",
panel_spacing = grid::unit(2, "lines"),
plot_margin = margin(30, 30, 30, 30),
mode = c("light", "dark", "rstudio"),
background_colour = theme_background_color(mode, light = "white", dark = "#121212"),
foreground_colour = theme_foreground_color(mode, light = "#262626", dark = "#e1e1e1"),
grid_col = theme_foreground_color(mode, light = "#cccccc", dark = "#606367"),
axis_col = theme_foreground_color(mode, light = "#2b2b2b", dark = "#606367"),
grid = TRUE,
axis = FALSE,
axis_text = TRUE,
ticks = FALSE
)
}
\arguments{
\item{base_size}{base font size}
\item{line_height}{default line height}
\item{plot_title_size}{plot title size}
\item{plot_title_position}{plot title position}
\item{plot_title_margin}{plot title margin}
\item{subtitle_size}{subtitle size}
\item{subtitle_margin}{subtitle margin}
\item{strip_text_size}{strip text size}
\item{strip_placement}{strip placement}
\item{caption_size}{caption size}
\item{caption_margin}{caption margin}
\item{axis_text_size}{axis text size}
\item{axis_title_size}{axis title size}
\item{axis_title_just}{axis title just}
\item{panel_spacing}{panel spacing}
\item{plot_margin}{plot margin}
\item{grid_col}{grid col}
\item{axis_col}{axis col}
\item{grid}{grid}
\item{axis}{axis}
\item{axis_text}{axis text labels}
\item{ticks}{ticks}
\item{text_geom_size}{text geom size}
}
\value{
ggplot2 theme
}
\description{
Uses the built-in \link{clear_sans_pkg} custom font.
}
\details{
\itemize{
\item \code{background_colour} dark mode is "\verb{#121212}" else "\code{white}"
\item \code{foreground_colour} dark mode is "\verb{#e1e1e1}" else "\verb{#262626}"
\item \code{grid_col} dark mode is "\verb{#606367}" else "\verb{#cccccc}"
\item \code{axis_col} dark mode is "\verb{#606367}" else "\verb{#2b2b2b}"
}
}
\note{
this function updates \code{Geom} defaults; use \code{\link[=reset_ggplot2_defaults]{reset_ggplot2_defaults()}} to
restore ggplot2 geom default aeshetics
}
\examples{
ggplot() +
geom_point(
data = mtcars,
aes(mpg, wt)
) +
geom_label(
aes(
x = 30, y = 4.5,
label = "A fairly useless\nannotation that\nuses the custom\nEau Sans variant\nby default."
),
label.size = 0
) +
labs(
x = "Fuel efficiency (mpg)", y = "Weight (tons)",
title = "Seminal ggplot2 scatterplot example",
subtitle = "A plot that is only useful for demonstration purposes",
caption = "Brought to you by the letter 'g'"
) +
theme_cs(grid = "XY")
}
Loading…
Cancel
Save