Description Usage Arguments Value Author(s)
View source: R/get_color_scale.R
The function can return either a color scale for a discrete variable or a gradient color scale for a continuous numeric variable.
1 2 3 4 5 6 |
palette_path |
A string that sets the file path for an .rds file containing a vector of colors in hexadecimal format.. |
scale_title |
A string that sets the title for the scale's legend. By default the title comes from the variable name assigned to the fill aesthetic. |
scale_limits |
A numeric vector of length two that sets the limits of the non-discrete scale based on the variable assigned to the fill aesthetic. |
discrete |
A logical that is TRUE the function returns a discrete color scale. If FALSE, a gradient color scale is returned. |
Returns a color scale object that can be attached to ggplot2 plot object for scaling the color aesthetic variable.
Rick Dean
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.