theme_empty: A basic and flexible plot theme (using ggplot2 and unikn).

Description Usage Arguments Details Value See Also Examples

View source: R/theme_fun.R

Description

theme_empty provides an empty (blank) theme to use in ggplot2 commands.

Usage

1
2
3
4
5
6
theme_empty(
  font_size = 12,
  font_family = "",
  rel_small = 12/14,
  plot_mar = c(0, 0, 0, 0)
)

Arguments

font_size

Overall font size. Default: font_size = 12.

font_family

Base font family. Default: font_family = "".

rel_small

Relative size of smaller text. Default: rel_small = 10/12.

plot_mar

Plot margin sizes (on top, right, bottom, left). Default: plot_mar = c(0, 0, 0, 0) (in lines).

Details

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.

Value

A ggplot2 theme.

See Also

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()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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)


  

ds4psy documentation built on May 12, 2021, 9:07 a.m.