View source: R/theme_mps_noto.R
theme_mps_noto | R Documentation |
Provides a ggplot2 theme.
theme_mps_noto(
base_size = 11,
base_family = "NotoSansDisplay_Condensed",
base_line_size = 0.5,
base_rect_size = 0.5
)
base_size |
default text size in px |
base_family |
defaults to |
base_line_size |
default line size |
base_rect_size |
default rect size |
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.
library(ggplot2)
library(ragg)
file <- tempfile(fileext = '.png')
agg_png(file)
ggplot(cars) +
geom_point(aes(speed, dist)) +
theme_mps_noto() +
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.