vtree
vtree copied to clipboard
Custom color palette
Is there a way to use a custom color palette, defined with hex codes, in vtree? (not part of RColor Brewer). Love this tool. Thanks!
Use the specfill argument to provide a list of the valid colors for categorical variables. The list consists of named character vectors of value = hexcolor
.
For example, if you had the categorical variables "sex" and "maritalStatus", you could add this parameter to vtree:
specfill = list(sex = c("female="red","male"="blue"), maritalStatus = c("married"="orange",single="green"))
Note that currently, the maximum number of values (colors) for a given variable is 9. I just created an issue report on this and hope it will be changed in the next version.