Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

theme_nice

A nice, flexible ggplot2 theme


Description

theme_nice is designed to work like any other complete theme from ggplot. It has a nice appearance.

Usage

theme_nice(
  legend.pos = "right",
  style = c("white", "light", "dark_blue", "dark_gray"),
  base_size = 11,
  base_family = "",
  base_line_size = base_size/22,
  base_rect_size = base_size/22
)

Arguments

legend.pos

One of "right", "left", "top", "bottom" (outside the plotting area), "topleft", "topright", "topmiddle", "bottomleft", "bottomright", or "bottommiddle" (inside the plotting area).

style

One of "white", "light", "dark_blue", or "dark_gray". "white" sets the background to white, "light" to light gray, "dark_gray" to dark gray, "dark_blue" to dark blue.

base_size

base font size, given in pts.

base_family

base font family

base_line_size

base size for line elements

base_rect_size

base size for rect elements

Author(s)

Jacob Long <long.1377@osu.edu>

Examples

# Create plot with ggplot2
library(ggplot2)
plot <- ggplot(mpg, aes(cty, hwy)) +
  geom_jitter() + theme_nice()

jtools

Analysis and Presentation of Social Scientific Data

v2.1.3
MIT + file LICENSE
Authors
Jacob A. Long [aut, cre] (<https://orcid.org/0000-0002-1582-6214>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.