My ggplot2 go-to theme inspired by hrbrthemes
theme_knst.Rd
My ggplot2 go-to theme inspired by hrbrthemes
Usage
theme_knst(
...,
base_size = 10,
plot_margin = ggplot2::margin(10, 10, 10, 10),
axis_title_size = 10,
grid_col = "grey80"
)
theme_knst_calibri(..., plot_title_face = "plain")
theme_knst_segoe(..., plot_title_face = "plain")
Arguments
- ...
Parameters for
hrbrthemes::theme_ipsum
- base_size
10
- plot_margin
ggplot2::margin(10, 10, 10, 10)
- axis_title_size
10
- grid_col
"grey80"
- plot_title_face
plot_title_face
Examples
if (FALSE) {
library(ggplot2)
library(extrafont)
library(hrbrthemes)
p <- ggplot(mtcars) +
geom_point(aes(mpg, hp, color = factor(carb)), size = 2.5) +
hrbrthemes::scale_color_ipsum(name = "Carb") +
labs(
x = "Fuel effiiency (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_knst()
p
pp <- p + facet_wrap(vars(factor(carb)))
pp + theme_knst(base_family = "Calibri")
pp + theme_knst_segoe()
pp + theme_knst_calibri(base_size = 15, axis_title_size = 15)
pp +
theme_knst(
base_family = "Calibri Light",
plot_title_family = "Calibri"
)
}