theme_empty | R Documentation |
theme_empty
provides an empty (blank) theme
to use in ggplot2 commands.
theme_empty(
font_size = 12,
font_family = "",
rel_small = 12/14,
plot_mar = c(0, 0, 0, 0)
)
font_size |
Overall font size.
Default: |
font_family |
Base font family.
Default: |
rel_small |
Relative size of smaller text.
Default: |
plot_mar |
Plot margin sizes (on top, right, bottom, left).
Default: |
theme_empty
shows nothing but the plot panel.
theme_empty
is based on
theme_nothing
of the cowplot package
and uses
theme_void
of the ggplot2 package.
A ggplot2 theme.
cowplot::theme_nothing
is the inspiration and source of this theme.
Other plot functions:
plot_charmap()
,
plot_chars()
,
plot_fn()
,
plot_fun()
,
plot_n()
,
plot_text()
,
plot_tiles()
,
theme_clean()
,
theme_ds4psy()
# Plotting iris dataset (using ggplot2):
library('ggplot2') # theme_empty() requires ggplot2
ggplot(datasets::iris) +
geom_point(aes(x = Petal.Length, y = Petal.Width, color = Species), size = 4, alpha = 1/2) +
scale_color_manual(values = c("firebrick3", "deepskyblue3", "olivedrab3")) +
labs(title = "NOT SHOWN: Title",
subtitle = "NOT SHOWN: Subtitle",
caption = "NOT SHOWN: Data from datasets::iris") +
theme_empty(plot_mar = c(2, 0, 1, 0)) # margin lines (top, right, bot, left)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.