I'm working on some heatmaps, and the person I'm working with would prefer a red-black-green color palette (red denoting gene induction and green denoting gene repression). Does such a palette exist already? If not, is there an easy way to create one? Thanks, Jake
red-black-green color palette?
4 messages · Jake Michaelson, Romain Francois, James W. MacDonald +1 more
Le 03.08.2005 18:23, Jake Michaelson a ??crit :
I'm working on some heatmaps, and the person I'm working with would prefer a red-black-green color palette (red denoting gene induction and green denoting gene repression). Does such a palette exist already? If not, is there an easy way to create one? Thanks, Jake
greenred in gplots is what you are looking for. Cheers, Romain
visit the R Graph Gallery : http://addictedtor.free.fr/graphiques ~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ ~~~~~~ Romain FRANCOIS - http://addictedtor.free.fr ~~~~~~ ~~~~ Etudiant ISUP - CS3 - Industrie et Services ~~~~ ~~ http://www.isup.cicrp.jussieu.fr/ ~~ ~~~~ Stagiaire INRIA Futurs - Equipe SELECT ~~~~ ~~~~~~ http://www.inria.fr/recherche/equipes/select.fr.html ~~~~~~ ~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
Jake Michaelson wrote:
I'm working on some heatmaps, and the person I'm working with would prefer a red-black-green color palette (red denoting gene induction and green denoting gene repression). Does such a palette exist already? If not, is there an easy way to create one?
See ?maPalette in the marray package of Bioconductor. HTH, Jim
Thanks, Jake
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
"Jake Michaelson" <jjmichael at comcast.net> wrote in message news:cbc7a1be7e3c68c0ccac507be8d3e7d8 at comcast.net...
I'm working on some heatmaps, and the person I'm working with would prefer a red-black-green color palette (red denoting gene induction and green denoting gene repression). Does such a palette exist already? If not, is there an easy way to create one?
Here are four ways:
showpanel <- function(Colors)
{
image(matrix(1:length(Colors), ncol=1), col=Colors, xaxt="n", yaxt="n" )
}
oldpar <- par(mfrow=c(4,2))
# Method 1 (colorRampPalette was new in R 2.1.0) in grDevices
# Same as function with same name in dichromat package?
showpanel(colorRampPalette( c("green", "black", "red"), space="rgb")(32))
showpanel(colorRampPalette( c("green", "black", "red"), space="rgb")(64))
# Method 2
library(gplots)
showpanel(greenred(32))
showpanel(redgreen(64))
# Method 3
library(geneplotter)
showpanel(greenred.colors(32))
showpanel(greenred.colors(64))
# Method 4
library("marray")
pal <- maPalette(low="green", high="red",mid="black")
maColorBar(seq(-2,2, 0.2), col=pal, horizontal=TRUE, k=0)
maColorBar(seq(-2,2, 0.1), col=pal, horizontal=TRUE, k=0)
efg
--
Earl F. Glynn
Scientific Programmer
Stowers Institute for Medical Research