theme_clean | R Documentation |
theme_clean
provides an alternative ds4psy theme
to use in ggplot2 commands.
theme_clean(
base_size = 11,
base_family = "",
base_line_size = base_size/22,
base_rect_size = base_size/22,
col_title = grey(0, 1),
col_panel = grey(0.85, 1),
col_gridx = grey(1, 1),
col_gridy = grey(1, 1),
col_ticks = grey(0.1, 1)
)
base_size |
Base font size (optional, numeric).
Default: |
base_family |
Base font family (optional, character).
Default: |
base_line_size |
Base line size (optional, numeric).
Default: |
base_rect_size |
Base rectangle size (optional, numeric).
Default: |
col_title |
Color of plot title (and tag).
Default: |
col_panel |
Color of panel background(s).
Default: |
col_gridx |
Color of (major) panel lines (through x/vertical).
Default: |
col_gridy |
Color of (major) panel lines (through y/horizontal).
Default: |
col_ticks |
Color of axes text and ticks.
Default: |
theme_clean
is more minimal than theme_ds4psy
and fills panel backgrounds with a color col_panel
.
This theme works well for plots with multiple panels, strong colors and bright color accents, but is of limited use with transparent colors.
A ggplot2 theme.
theme_ds4psy
for default theme.
Other plot functions:
plot_charmap()
,
plot_chars()
,
plot_fn()
,
plot_fun()
,
plot_n()
,
plot_text()
,
plot_tiles()
,
theme_ds4psy()
,
theme_empty()
# Plotting iris dataset (using ggplot2, theme_grau, and unikn colors):
library('ggplot2') # theme_clean() requires ggplot2
library('unikn') # for colors and usecol() function
ggplot(datasets::iris) +
geom_jitter(aes(x = Sepal.Length, y = Sepal.Width, color = Species), size = 3, alpha = 3/4) +
facet_wrap(~Species) +
scale_color_manual(values = usecol(pal = c(Pinky, Karpfenblau, Seegruen))) +
labs(tag = "B",
title = "Iris sepals",
caption = "Data from datasets::iris") +
coord_fixed(ratio = 3/2) +
theme_clean()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.