set_theme | R Documentation |
Sets the default color schemes, fonts, and theme for ggplot2 plots. The default color scheme for continuous variables is the viridis color palette, and the default color scheme for discrete variables is the Okabe Ito palette.
set_theme(
font = "Arial Narrow",
discrete = c("okabeito", "atlas", "ggplot2"),
continuous = c("viridis", "magma", "inferno", "plasma", "cividis", "ggplot2"),
...
)
font |
The base font family to be used in plots. |
discrete |
Color palette for discrete colors. One of "okabeito" (default), "atlas", or "ggplot2". |
continuous |
Color palette for continuous scales. One of "magma", "inferno", "plasma", "viridis" (default), or "cividis", or "ggplot2". |
... |
Additional arguments to pass to theme functions. |
None. Called for side effects.
set_theme("Arial Narrow")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.