set_palette {ggpubr} | R Documentation |
Set Color Palette
Description
-
change_palette(), set_palette()
: Change both color and fill palettes. -
color_palette()
: change color palette only. -
fill_palette()
: change fill palette only.
Usage
set_palette(p, palette)
change_palette(p, palette)
color_palette(palette = NULL, ...)
fill_palette(palette = NULL, ...)
Arguments
p |
a ggplot |
palette |
Color palette. Allowed values include:
|
... |
other arguments passed to ggplot2 scale_color_xxx() and scale_fill_xxx() functions. |
See Also
Examples
# 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")
[Package ggpubr version 0.6.0 Index]