View source: R/default.grin.colors.R
| default.grin.colors | R Documentation |
Assigns a default set of colors to lesion types for use in GRIN plots.
default.grin.colors(
lsn.types
)
lsn.types |
A character vector of lesion types, typically obtained from
the |
This function assigns colors from a predefined palette of up to 10 colors. Colors are assigned to unique lesion types in alphabetical order. If more than 10 unique lesion types are provided, custom colors must be specified manually in the plotting function.
A named character vector in which names correspond to the unique lesion types and values correspond to their assigned colors.
Abdelrahman Elsayed abdelrahman.elsayed@stjude.org, Stanley Pounds stanley.pounds@stjude.org
data(lesion_data)
# Extract unique lesion types
lsn.types <- unique(lesion_data$lsn.type)
# Assign default colors to lesion types
default.grin.colors(lsn.types)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.