make_colors {ontophylo} | R Documentation |
Make color palette for image plotting
Description
Produces a color scale for a given statistic of evolutionary rate.
Usage
make_colors(Stat, palette)
Arguments
Stat |
numeric. A named vector where values are the statistics, and names are ontology term labels. |
palette |
A character vector or function defining a color palette. |
Value
A character vector where elements are color IDs and names are the input ontology term labels.
Author(s)
Sergei Tarasov
Examples
stat <- setNames(runif(5, 0.1, 10),
c("cranium", "fore_wing", "hind_wing", "pronotum", "propectus") )
hm.palette <- colorRampPalette(RColorBrewer::brewer.pal(9, "Spectral"), space = "Lab")
cols.maps <- make_colors(stat, palette = hm.palette(100))
cols.maps
[Package ontophylo version 1.1.3 Index]