color.bar: Creates a color bar:

View source: R/plotting_functions.R

color.barR Documentation

Creates a color bar:

Description

Taken from http://www.colbyimaging.com/wiki/statistics/color-bars. Creates a color bar from a given color scale and range of tick values.

Usage

color.bar(
  lut,
  min,
  max = -min,
  nticks = 11,
  ticks = seq(min, max, len = nticks),
  title = ""
)

Arguments

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.

Value

color_bar (figure) : A color bar.


lcrawlab/SINATRA documentation built on Sept. 13, 2023, 2 p.m.