View source: R/ggplot2-themes.R
theme_pgl_minimal | R Documentation |
Basic penngradlings theme template
theme_pgl_minimal(
base_size = 12,
axis_lines = "",
grid_lines = "xy",
grid_lines_minor = FALSE,
outline_color = "#1F1C1C"
)
base_size |
Base size for text elements |
axis_lines |
Which axis lines should be drawn, passed as a string. |
grid_lines |
Which grid lines should be drawn, passed as a string. |
grid_lines_minor |
Whether minor grid lines should be draw. Defaults to |
outline_color |
Primary color for text, line, and rectangle outline. |
A theme object created by theme()
## Not run:
library(ggplot2)
ggplot(iris, aes(Petal.Length, Petal.Width, color = Species)) +
geom_point(size = 2) +
labs(
title = "Petal profile of plant species in the iris dataset",
subtitle = "Virginica has the largest petal of the three species"
) +
facet_wrap(~Species) +
theme_pgl_minimal(base_size = 11)
ggplot(diamonds, aes(cut, price, fill = cut)) +
stat_summary(geom = "bar", fun = "mean", width = 0.8) +
scale_y_continuous(
expand = expansion(c(0, 0.1)),
labels = ~ paste0("$", .x)
) +
scale_fill_manual(values = pgl_pals("christine", "blueberry_boba")) +
labs(
title = "Price of diamonds by cut quality",
subtitle = "This is a bad explanatory plot because carat (size) is a confounding variable",
x = NULL, y = NULL,
caption = "diamonds dataset from {ggplot2}"
) +
theme_pgl_minimal(axis_lines = "x", grid_lines = "y")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.