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

bgcolor

Change ggplot Panel Background Color


Description

Change ggplot panel background color.

Usage

bgcolor(color)

Arguments

color

background color.

See Also

border().

Examples

# 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")

ggpubr

'ggplot2' Based Publication Ready Plots

v0.4.0
GPL-2
Authors
Alboukadel Kassambara [aut, cre]
Initial release
2020-06-27

We don't support your browser anymore

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