plot_theme: Themes for all plots

View source: R/ploTheme.R

plot_themeR Documentation

Themes for all plots

Description

Change ggplot text, font, legend and border

Usage

plot_theme(
  main_text_size = 8,
  legend_text_size = 6,
  font_type = "sans",
  border_thick = 1.5,
  remove_grid = TRUE,
  remove_border = FALSE,
  remove_main_text = FALSE,
  remove_legend_text = FALSE,
  remove_legend = FALSE
)

Arguments

main_text_size

Numeric, main text size

legend_text_size

Numeric, legend text size

font_type

Character, specify the plot text font family, default is "sans".

border_thick

Numeric, border thickness, default is 1. If set 0, remove both border and ticks.

remove_grid

Logical, remove background grid lines, default is FALSE.

remove_border

Logical, remove border line, default is FALSE.

remove_main_text

Logical, remove all axis text, default is FALSE.

remove_legend_text

Logical, remove all legend text, default is FALSE.

remove_legend

Logical, remove entire legend, default is FALSE.

Value

ggplot theme

Examples

library(ggplot2)
ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point() +
  plot_theme(font_type = "Times", border_thick = 2)

genekitr documentation built on Sept. 8, 2023, 6:06 p.m.