Learn R Programming

rtemis (version 0.79)

penn.heat: Create a color gradient

Description

Creates a gradient of colors ranging from light Penn blue (Penn blue with increased Value in HSV) to Penn blue, to Penn red, to light Penn yellow. It is best to provide an odd number, so that there is always an equal number of colors on either side of the midpoint, which will be Penn blue. For example, if you want a gradient from -1 to 1 or equivalent, an n = 11, will give 5 colors on either side of 0, each representing a 20

Usage

penn.heat(n = 11, space = "Lab", demo = FALSE, colorbar = FALSE,
  bar.min = -1, bar.mid = 0, bar.max = 1, cex = 1.2,
  filename = NULL, col.text = "black")

Arguments

n

Integer. How many distinct colors you want. Defaults to 11

space

String. Which colorspace to use. Option: "RGB", "Lab". Defaults to "Lab

demo

Logical. Plot the colors horizontally

colorbar

Logical. Create a vertical colorbar

bar.min

Numeric. Lowest value in colorbar

bar.mid

Numeric. Middle value in colorbar

bar.max

Numeric. Max value in colorbar

filename

Optional. Path to file to save colorbar

col.test

Color for colorbar text