set_palette {ggpubr} | R Documentation |
change_palette(), set_palette()
: Change
both color and fill palettes.
color_palette()
: change color
palette only.
fill_palette()
: change fill palette only.
set_palette(p, palette)
change_palette(p, palette)
color_palette(palette = NULL, ...)
fill_palette(palette = NULL, ...)
p |
a ggplot |
palette |
Color palette. Allowed values include:
|
... |
other arguments passed to ggplot2 scale_color_xxx() and scale_fill_xxx() functions. |
# Load data
data("ToothGrowth")
df <- ToothGrowth
# Basic plot
p <- ggboxplot(df, x = "dose", y = "len",
color = "dose")
p
# Change the color palette
set_palette(p, "jco")