Complete ggplot2 themes.

acid_theme_light(base_size = 14L, base_family = "", face = c("bold",
  "plain"), aspect_ratio = NULL, legend_position = c("right", "bottom",
  "top", "none"), grid = FALSE, minimal = FALSE)

acid_theme_dark(base_size = 14L, base_family = "", face = c("bold",
  "plain"), aspect_ratio = NULL, legend_position = c("right", "bottom",
  "top", "none"), grid = FALSE, minimal = FALSE)

Arguments

base_size

numeric(1). Base font size.

base_family

character(1). Base font family.

face

character(1). Font face ("bold", "plain").

aspect_ratio

numeric(1). Aspect ratio, specifying the plot proportions. Use 1 for a perfectly square plot (including the axis labels).

legend_position

character(1). Legend key position. We're being a little more restrictive here, only allowing "bottom", "right", or "none". Including the legend at the top or the left side of the plot rarely makes sense and is discouraged.

grid

logical(1). Label the major panel grids with a gray accent.

minimal

logical(1). Remove all axis lines, axis ticks, and panel borders.

Value

theme.

Details

Both themes are based off of ggplot2::theme_linedraw(), but with modifications and extra user-definable parameters.

Light

High contrast black and white theme optimized for print. Recommended for scientific manuscripts and website tutorials.

Dark

Blackout theme that sets the plot background as black, with white text. Inspired by Seurat::DarkTheme(), with some color modifications. Useful for visualizing many points with a high dynamic color range, such as t-SNE expression plots.

See also

Examples

library(ggplot2) p <- ggplot( data = mpg, mapping = aes( x = manufacturer, y = displ, color = manufacturer, fill = manufacturer ) ) ## Paperwhite theme. p + geom_point() + acid_theme_light(legend_position = "none")
## Midnight theme. p + geom_point() + acid_theme_dark(legend_position = "none")