View source: R/plotting_functions.R
color.bar | R Documentation |
Taken from http://www.colbyimaging.com/wiki/statistics/color-bars. Creates a color bar from a given color scale and range of tick values.
color.bar(
lut,
min,
max = -min,
nticks = 11,
ticks = seq(min, max, len = nticks),
title = ""
)
lut |
(function) : The color scale. |
min |
(float) : Minimum value on the color scale |
max |
(float): Maximum value of the color scale |
nticks |
(int) : Number of ticks to have on the color bar. |
ticks |
(vector): The vector of ticks (the user can pass in a vector of custom axes ticks) |
title |
(string): The title of the color bar. |
color_bar (figure) : A color bar.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.