treepalette | R Documentation |
Obtain hierarchical color palettes, either the so-called Tree Colors from the HCL color space model, or by using an existing color palette. The former method, which is recommended, is used by default in treemap
(type "index"
) and treegraph
. Use treecolors
to experiment with this method.
treepalette(
dtf,
index = names(dtf),
method = "HCL",
palette = NULL,
palette.HCL.options,
return.parameters = TRUE,
prepare.dat = TRUE
)
dtf |
a data.frame or data.table. Required. |
index |
the index variables of dtf |
method |
used method: either |
palette |
color palette, which is only used for the HSV method |
palette.HCL.options |
list of options to obtain Tree Colors from the HCL space (when
For "depth" and "categorical" types, only the first two items are used. Use |
return.parameters |
should a data.frame with color values and parameter options be returned ( |
prepare.dat |
data is by default preprocessed, except for interal use |
Either a vector of colors, or a data.frame is return (see return.parameters
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.