Description Usage Arguments See Also Examples
change_palette(), set_palette()
: Change
both color and fill palettes.
color_palette()
: change color
palette only.
fill_palette()
: change fill palette only.
1 2 3 4 5 6 7 | 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. |
get_palette.
1 2 3 4 5 6 7 8 9 10 11 | # 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.