Learn R Programming

utile.visuals (version 0.3.3)

panel_border: Add a panel border to a ggplot2 plot

Description

A simple ggplot2 theme which replaces the axis lines with a bordered panel.

Usage

panel_border(base_size = 12, base_color = NULL)

Arguments

base_size

A numeric. Base size. Used to calculate line size and spacing.

base_color

A character. Base color for lines.

Examples

Run this code
library(ggplot2)

ggplot(datasets::mtcars, aes(x = wt, y = hp, color = as.factor(cyl))) +
  geom_point() +
  facet_wrap(~as.logical(am)) +
  theme_basic() +
  panel_border()

Run the code above in your browser using DataLab