makeColors | R Documentation |
makeColors builds a vector of RGB colors to represent numerical values. This color representation is generated by applying piecewise color mapping to input values.
makeColors( p, thresholds = c(10, 50, 500, 5000), colors = c("blue", "yellow", "red", "black"), background = "white", overflow = "white" )
p |
vector of positive numeric values. |
thresholds |
numeric vector defining the boundaries between ranges of values to be mapped into a specific color interval (default = c(10, 50, 500, 5000)). |
colors |
color vector providing the colors representing each threshold value (default = c("blue", "yellow", "red", "black")). |
background |
color representing p = 0, which is set to "white" by default. |
overflow |
color representing p > max(thresholds), which is set to "white" by default. |
makeColors returns a character vector of RGBA colors in hexadecimal.
Benjamin Leblanc
domainogram
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.