Learn R Programming

ds4psy (version 0.6.0)

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

Description

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

Usage

theme_empty(font_size = 12, font_family = "", rel_small = 12/14)

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.

Value

A ggplot2 theme.

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.

See Also

cowplot::theme_nothing is the inspiration and source of this theme.

Other plot functions: plot_fn(), plot_fun(), plot_n(), plot_text(), plot_tiles(), theme_clean(), theme_ds4psy()

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
# Plotting iris dataset (using ggplot2):

library('ggplot2')  # theme_empty() requires ggplot2
   
ggplot(datasets::iris) +
  geom_jitter(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()

# }
# NOT RUN {
  
# }

Run the code above in your browser using DataLab