bgcolor: Change ggplot Panel Background Color

Description Usage Arguments See Also Examples

View source: R/bgcolor.R

Description

Change ggplot panel background color.

Usage

1
bgcolor(color)

Arguments

color

background color.

See Also

border().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Load data
data("ToothGrowth")
df <- ToothGrowth

# Basic plot
p <- ggboxplot(df, x = "dose", y = "len")
p

# Change panel background color
p +
  bgcolor("#BFD5E3")+
  border("#BFD5E3")

Example output

Loading required package: ggplot2
Loading required package: magrittr

ggpubr documentation built on July 2, 2020, 2:12 a.m.