Last data update: 2014.03.03

R: Create a completely empty theme
theme_nothingR Documentation

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

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

Results