color.bar {ontophylo} | R Documentation |
Color bar
Description
Function to plot the color scale bar.
Usage
color.bar(
pal,
min,
max = -min,
nticks = 11,
ticks = seq(min, max, len = nticks),
title = ""
)
Arguments
pal |
character. A vector with color IDs. |
min |
numeric. Value for lower limit of the scale. |
max |
numeric. Value for upper limit of the scale. |
nticks |
integer. Number of subdivisions of the scale. |
ticks |
integer. A vector of values for the scale. |
title |
character. A legend for the scale bar. |
Value
A plot of the color scale bar.
Author(s)
Sergei Tarasov
Examples
stat <- runif(10, 0.25, 1)
hm.palette <- colorRampPalette(RColorBrewer::brewer.pal(9, "Spectral"), space = "Lab")
color.bar(hm.palette(100), min = min(stat), max = max(stat),
ticks = round(c(min(stat), max(stat)/2, max(stat)), 2), title = "")
[Package ontophylo version 1.1.3 Index]