Search
Question: heatmap colours
0
gravatar for Stephen Henderson
14.5 years ago by
Stephen Henderson1.0k wrote:
I have been using the new heatmap() function of the mva library to look at gene expression data (thanks to D. Murdoch). I can't find a suitable color palette with R or RColorBrewer. So has anyone created a Red-Black- Green, or Red-Black-Blue palette they might like to share? Yours Hopefully Stephen ********************************************************************** This email and any files transmitted with it are confidential an... {{dropped}}
ADD COMMENTlink modified 14.5 years ago by rgentleman5.5k • written 14.5 years ago by Stephen Henderson1.0k
0
gravatar for Warnes, Gregory R
14.5 years ago by
Warnes, Gregory R460 wrote:
Try this: # Red for down regulated, green for upregulated. redgreen <- function(n) { c( hsv(h=0/6, v=seq(1,0,length=n/2) ), hsv(h=2/6, v=seq(0,1,length=n/2) ), ) } Use as: heatmap( datamat, col=redgreen(20) ) -Greg > -----Original Message----- > From: Stephen Henderson [mailto:s.henderson@ucl.ac.uk] > Sent: Monday, May 12, 2003 7:50 AM > To: 'bioconductor@stat.math.ethz.ch' > Subject: [BioC] heatmap colours > > > I have been using the new heatmap() function of the mva > library to look at > gene expression data (thanks to D. Murdoch). I can't find a > suitable color > palette with R or RColorBrewer. So has anyone created a > Red-Black-Green, or > Red-Black-Blue palette they might like to share? > > Yours Hopefully > Stephen > > > ********************************************************************** > This email and any files transmitted with it are confidential > an... {{dropped}} > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor > LEGAL NOTICE\ Unless expressly stated otherwise, this message is... {{dropped}}
ADD COMMENTlink written 14.5 years ago by Warnes, Gregory R460
0
gravatar for Jean Yee Hwa Yang
14.5 years ago by
Jean Yee Hwa Yang920 wrote:
Hi Stephen, Try the maPalette function in marrayPlots. You can create many different color palettes by specifying the low, and high end of the color. See help(maPalette) for more details ## Red -- Black -- Green rbg <- maPalette(low="green", high="red", mid="black") heatmap(data, col=rbg) ## Red -- white -- Green rwg <- maPalette(low="green", high="red", mid="white") heatmap(data, col=rwg) ## blue--yellow by <- maPalette(low="blue", high="yellow") heatmap(data, col=by) Cheers Jean ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jean Yee Hwa Yang jean@biostat.ucsf.edu Division of Biostatistics, Tel: (415) 476-3368 University of California, Fax: (415) 476-6014 500 Parnassus Avenue, MU 420-W, San Francisco, CA 94143-0560 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On Mon, 12 May 2003, Stephen Henderson wrote: > I have been using the new heatmap() function of the mva library to look at > gene expression data (thanks to D. Murdoch). I can't find a suitable color > palette with R or RColorBrewer. So has anyone created a Red-Black- Green, or > Red-Black-Blue palette they might like to share? > > Yours Hopefully > Stephen > > > ********************************************************************** > This email and any files transmitted with it are confidential an... {{dropped}} > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor >
ADD COMMENTlink written 14.5 years ago by Jean Yee Hwa Yang920
Jean Yee Hwa Yang <jean@biostat.ucsf.edu> [Mon, May 12, 2003 at 07:31:59PM CEST]: [...] > > ## Red -- Black -- Green [...] > ## Red -- white -- Green [...] > ## blue--yellow [...] General discussion about the usefulness of heat maps aside, why is everyone infatuated with the red/green contrast? Just because cDNA chips are marked with red and green dye? We are not looking at a chip image here, so generally we are free wrt choice of colours. Red and green is less than optimal for several reasons: - A non-neglectable proportion of the population, especially the male sector of it, cannot distinguish between those colours. - It makes for poor contrast when transformed to grayscale. The visualization guides I have read don't condone a red/green contrast scale (while Edward Tufte doesn't specifically list it as a deterring example, he doesn't recommend it either). One suggestion is a palet along black -- red -- orange -- yellow -- white, mimicking the appearance of a black body heated up. (That would cause "heat map" to be an apt term at last. ok. I'm feeling better now. Johannes -- Johannes H?sing There is something fascinating about science. One gets hannes@ruhrau.de such wholesale returns of conjecture from such a trifling investment of fact. Mark Twain
ADD REPLYlink written 14.5 years ago by Johannes Hüsing100
It was originally done to mimic the Cy3/Cy5 labels. Everybody else used it because thats what the software did and there wasn't any way to change it. Personally I like Blue->White->Red as fully saturated Blue and Red have roughly the same apparent brightness (as opposed to Blue->White->Yellow... I've never understood that color choice except that Blue and Yellow are, sort of, UCLA's school colors) and the plot background color is generally white, making white seem like the logical choice for "center." They maintain the "heat" paradigm as traditional indicators of hot and cold and unlike blackbody heat maps are more directly comparable in absolute value. No, I don't have a function handy... I just keep a 1025 element vector of color values around in an RDA file. On Monday, May 12, 2003, at 05:47 PM, Johannes H?sing wrote: > Jean Yee Hwa Yang <jean@biostat.ucsf.edu> [Mon, May 12, 2003 at > 07:31:59PM CEST]: > [...] >> >> ## Red -- Black -- Green > [...] >> ## Red -- white -- Green > [...] >> ## blue--yellow > [...] > > General discussion about the usefulness of heat maps aside, why is > everyone infatuated with the red/green contrast? Just because cDNA > chips are marked with red and green dye? We are not looking at a > chip image here, so generally we are free wrt choice of colours. > Red and green is less than optimal for several reasons: > > - A non-neglectable proportion of the population, especially the > male sector of it, cannot distinguish between those colours. > - It makes for poor contrast when transformed to grayscale. > > The visualization guides I have read don't condone a red/green > contrast scale (while Edward Tufte doesn't specifically list it as a > deterring example, he doesn't recommend it either). One suggestion is > a palet along black -- red -- orange -- yellow -- white, mimicking the > appearance of a black body heated up. (That would cause "heat map" to > be an apt term at last. > > ok. I'm feeling better now. > > > Johannes > -- > Johannes H?sing There is something fascinating about science. One > gets > hannes@ruhrau.de such wholesale returns of conjecture from such a > trifling investment of fact. Mark > Twain > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor > Byron Ellis (bellis@hsph.harvard.edu) "Oook" - The Librarian
ADD REPLYlink written 14.5 years ago by Byron Ellis280
0
gravatar for rgentleman
14.5 years ago by
rgentleman5.5k
United States
rgentleman5.5k wrote:
If you want to choose good colors please look at Cynthia Brewer's work www.colorbrewer.org) or the R package RColorBrewer and yes there are examples of doing so in Bioconcductor and no we don't force people to make good choices :-) Robert On Mon, May 12, 2003 at 11:47:33PM +0200, Johannes H?sing wrote: > Jean Yee Hwa Yang <jean@biostat.ucsf.edu> [Mon, May 12, 2003 at 07:31:59PM CEST]: > [...] > > > > ## Red -- Black -- Green > [...] > > ## Red -- white -- Green > [...] > > ## blue--yellow > [...] > > General discussion about the usefulness of heat maps aside, why is > everyone infatuated with the red/green contrast? Just because cDNA > chips are marked with red and green dye? We are not looking at a > chip image here, so generally we are free wrt choice of colours. > > Red and green is less than optimal for several reasons: > > - A non-neglectable proportion of the population, especially the > male sector of it, cannot distinguish between those colours. > - It makes for poor contrast when transformed to grayscale. > > The visualization guides I have read don't condone a red/green > contrast scale (while Edward Tufte doesn't specifically list it as a > deterring example, he doesn't recommend it either). One suggestion is > a palet along black -- red -- orange -- yellow -- white, mimicking the > appearance of a black body heated up. (That would cause "heat map" to > be an apt term at last. > > ok. I'm feeling better now. > > > Johannes > -- > Johannes H?sing There is something fascinating about science. One gets > hannes@ruhrau.de such wholesale returns of conjecture from such a > trifling investment of fact. Mark Twain > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor -- +--------------------------------------------------------------------- ------+ | Robert Gentleman phone : (617) 632-5250 | | Associate Professor fax: (617) 632-2444 | | Department of Biostatistics office: M1B20 | | Harvard School of Public Health email: rgentlem@jimmy.harvard.edu | +--------------------------------------------------------------------- ------+
ADD COMMENTlink written 14.5 years ago by rgentleman5.5k
Robert Gentleman <rgentlem@jimmy.harvard.edu> [Mon, May 12, 2003 at 11:56:15PM CEST]: > If you want to choose good colors please look at Cynthia Brewer's work > www.colorbrewer.org) or the R package RColorBrewer very nice. Thank you for mentioning the package! [...] > don't force people to make good choices :-) Well, maybe not force them, but maybe nudge them, like, have the default be your way rather than the unwashed masses' way? Greetings Johannes -- Johannes H?sing There is something fascinating about science. One gets hannes@ruhrau.de such wholesale returns of conjecture from such a trifling investment of fact. Mark Twain
ADD REPLYlink written 14.5 years ago by Johannes Hüsing100
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 285 users visited in the last hour