Skip to contents

When this theme is applies to a plot, results in a white-background, full outer borders, no Y axis label or breaks and center-aligned title.

Usage

theme_cleany(
  xsize = 8,
  xtsize = 6,
  titlesize = 10,
  legend_opts = list(pos = "none", dir = "horizontal"),
  lines_color = "black"
)

Arguments

xsize

Size of X axis label/title text

xtsize

Size of X axis tick labels text

titlesize

Size of plot title

legend_opts

Legend styling option, a list containing pos(position) and dir (direction).

lines_color

Color to assign to graph panel border as well as axes lines

Value

A minimal ggplot2 theme without Y axis details

Examples

data(adsl)
library(ggplot2)
ggplot(
  adsl,
  aes(
    x = .data[["RACE"]], y = .data[["AGE"]],
    color = .data[["SEX"]]
  )
) +
  geom_point() +
  theme_cleany(legend_opts = list(pos = "bottom", dir = "horizontal"))