Description Usage Arguments Value
Make a nice color palette appropriate for plotting functions
1 2 | make_colors(n = 0, type = c("lines", "regions"), showcolors = FALSE,
alpha = "FF")
|
n |
Number of colors to return. If n is larger than the palette selected, then the colors are recycled. |
type |
The type of color palette to create. If type = 'lines' (the default), then the palette is a set of colors most appropriate to plot lines on a white background. If type = 'regions' then the palette is a set of pastel colors appropriate to highlight regions on a plot or to make a bar graph (with a preset level of alpha). |
showcolors |
Logical. Specifies whether to plot a bar chart that shows the colors in the selected palette with their names. |
alpha |
The colors alpha or transparency for the entire set. Defined as a 2 character hex string to be appended to each color. Ignored when type = "regions". Default is "FF" for no transparency. |
Returns a named vector of RGB colors (in hex format). xtsanalytics functions can refer to the names of these colors rather than their index number when the user specifies a given set of colors. See xtsplot for details.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.