Description Usage Arguments Value Author(s)
View source: R/densityLegend.R
Function to take a numeric vector 'colorVar' and palette 'colorPalette', and return a list containing a vector of color assignments for each element of 'colorVar' (to be used in plot calls), and a vector of breaks defining the color regions (to be used in densityLegend)
1 | splitColorVar(colorVar, colorPalette, breaks = NULL)
|
colorVar |
the numeric vector of values used to color the points |
colorPalette |
a color palette. If 'colorPalette' contains, for example, 6 colors, then the values of colorVar will be split and assigned to these 6 colors |
breaks |
(optional) a numeric vector of two or more unique cut points |
a list containing a vector of color assignments ('colorVec') for each element of 'colorVar' (to be used in plot calls), and a vector of breaks ('breaks') defining the color regions (to be used in densityLegend)
Jason Waddell
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.