Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

greenBlackRed

Green-black-red color sequence


Description

Generate a green-black-red color sequence of a given length.

Usage

greenBlackRed(n, gamma = 1)

Arguments

n

number of colors to be returned

gamma

color correction power

Details

The function returns a color vector that starts with pure green, gradually turns into black and then to red. The power gamma can be used to control the behaviour of the quarter- and three quarter-values (between green and black, and black and red, respectively). Higher powers will make the mid-colors more green and red, respectively.

Value

A vector of colors of length n.

Author(s)

Peter Langfelder

Examples

par(mfrow = c(3, 1))
  displayColors(greenBlackRed(50));
  displayColors(greenBlackRed(50, 2));
  displayColors(greenBlackRed(50, 0.5));

WGCNA

Weighted Correlation Network Analysis

v1.70-3
GPL (>= 2)
Authors
Peter Langfelder <Peter.Langfelder@gmail.com> and Steve Horvath <SHorvath@mednet.ucla.edu> with contributions by Chaochao Cai, Jun Dong, Jeremy Miller, Lin Song, Andy Yip, and Bin Zhang
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.