an opinionated ggplot2 theme
theme_mps_noto_dark.Rd
Provides a ggplot2 theme.
Usage
theme_mps_noto_dark(
base_size = 11,
base_family = "NotoSansDisplay_SC",
base_line_size = 0.5,
base_rect_size = 0.5
)
Arguments
- base_size
default text size in px
- base_family
defaults to
"NotoSansDisplay_Condensed"
. Which is provided in the package. Generally, use a sensible sans serif font that is available on your system.- base_line_size
default line size
- base_rect_size
default rect size
Details
Uses Google's Noto Sans Display font by default. Using the
ragg::agg_png()
or related graphics device should ensure the font is
properly detected and used.
Examples
library(ggplot2)
library(ragg)
file <- tempfile(fileext = '.png')
agg_png(file)
ggplot(cars) +
geom_point(aes(speed, dist)) +
theme_mps_noto_dark() +
labs(title = "Cars", subtitle = "Speed and stopping distance",
caption = "Ezekiel, M (1930) Methods of Correlation Analysis",
x = "Speed [mph]",
y = "Stopping Distance [ft]")
dev.off()
#> agg_png
#> 2