Learn R Programming

rampage (version 0.2.0)

ramps: Color gradient ramps

Description

Contains functions produced by the colorRampPalette function.

Usage

gradinv(n)

Value

A character vector of color values.

Arguments

n

(numeric) Number of different colors to generate from the palette

Details

You can also view single palettes individually. The following color palettes are implemented:

  • gradinv(): inverse heatmap, primarily intended to emphasize distinctions between no-change (yellow) and change (blue/red) cases. Based on the color blindness simulator Coblis, the palette is very color disability-friendly, except for monochromacy/achromatopsia, where the two change scenarios (red and blue) become very difficult to distinguish. Additional markings (e.g. labels indicating high and low) are recommended for these cases.

Examples

Run this code
cols <- gradinv(20)
plot(1:20, col=cols, pch=16, cex=2)

Run the code above in your browser using DataLab