theme_d6 | R Documentation |
A dedicated theme for graphics created within the D6, with sensible defaults and additional options. It is based on the light theme and uses the custom typefaces PT Sans (defaul) and PT Serif (optional).
theme_d6(
base_size = 14,
base_family = "PT Sans",
grid = "xy",
legend = "bottom",
mono = "none",
bg = "transparent",
serif = FALSE,
margin = rep(base_size/2, 4),
...
)
base_size |
Numeric. The base sizes used for theme elements, defaults to 14 (which is slightly larger than in the default themes which use 11). |
base_family |
Character. The base font family, defaults to PT Sans. Typefaces need to be installed locally. |
grid |
Character. Should the panel grid be drawn? Specify |
legend |
Character or numeric vector. The position of legends as to be
used in the |
mono |
Character. Should the axis and/or legend text be formatted as tabular,
mono-spaced font? Specify the axes with |
bg |
Color. The color used for the plot background, defaults to transparent. |
serif |
Logical. Should Sans or Sans Serif fonts be used? Default is
|
margin |
Vector. The plot margin four-element numeric vector specifying
the margin on the top, right, bottom, and left. Defaults to
|
... |
Other arguments passed to complete ggplot2 themes. |
library(ggplot2)
ggplot(mpg, aes(x = class, y = cty, color = class)) + geom_boxplot() +
theme_d6(grid = "y", bg = "grey90", legend = "top", mono = "y")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.