View source: R/colors_continuous.R
cmap_fill_continuous | R Documentation |
Pick the function depending on the aesthetic of your ggplot object (fill or
color). On diverging palettes, a midpoint can be manually adjusted (defaults
to 0). See cmap_gradients
for a listing of available gradients.
cmap_fill_continuous(palette = "blues", reverse = FALSE, middle = 0, ...)
cmap_color_continuous(palette = "blues", reverse = FALSE, middle = 0, ...)
cmap_colour_continuous(palette = "blues", reverse = FALSE, middle = 0, ...)
palette |
String; Choose from 'cmap_gradients' list |
reverse |
Logical; Reverse color order? |
middle |
Numeric; Sets midpoint for diverging color palettes. Default = 0. |
... |
Additional parameters passed on to the scale type |
cmap_fill_continuous()
: for fill aesthetic
cmap_color_continuous()
: for color aesthetic
cmap_colour_continuous()
: for color aesthetic
ggplot(dplyr::filter(grp_over_time, cluster=="Biopharmaceuticals"),
aes(x = year, y = realgrp, color = realgrp)) +
geom_line() +
cmap_color_continuous(palette = "red_purple")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.