Learn R Programming

cowplot (version 0.5.0)

theme_nothing: Create a completely empty theme

Description

The theme created by this function shows nothing but the plot panel. Unfortunately, due to ggplot2 peculiarities, a little bit of padding remains to the left and bottom of the panel. This can be removed by adding labs(x = NULL, y = NULL) to the plot, see examples.

Usage

theme_nothing(base_size = 12, base_family = "")

Arguments

base_size
Overall font size. Default is 14.
base_family
Base font family.

Value

  • The theme.

Examples

Run this code
# plot with small amount of remaining padding
qplot(1:10, (1:10)^2) + theme_nothing()
# remaining padding removed
qplot(1:10, (1:10)^2) + theme_nothing() + labs(x = NULL, y = NULL)

Run the code above in your browser using DataLab