Wei Liu
2013-Aug-31 09:29 UTC
[R] How to plot a pretty heatmap with uneven distributed data?
Dear All, I want to plot a heatmap with R, but my data distributed unevenly, for example, my data range from 10 to 1500, but most of the data smaller than 200, when I plot a heatmap, the colour is also distributed unevenly, most part of the heatmap is one colour, so the heatmap is ugly and meaningless. So can anybody help me plot a pretty heatmap for me with the attached data. I am looking forward your reply! Thansk very much. Best Regards. Wei Liu. -------------- next part -------------- OTUID CKN.1 CKP.1 A1.1 A1.2 A1.3 B1.1 B1.2 B1.3 CKN.2 CKP.2 A2.1 A2.2 A2.3 B2.1 B2.2 B2.3 CKN.3 CKP.3 A3.1 A3.2 A3.3 B3.1 B3.2 B3.3 280 4.0 0.0 2.0 0.0 0.0 7.0 2.0 0.0 0.0 0.0 0.0 32.0 3.0 1.0 7.0 0.0 5.0 6.0 1.0 0.0 6.0 2.0 1.0 23.0 631 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 6.0 8.0 3.0 12.0 1.0 16.0 4.0 1.0 10.0 17.0 1.0 48.0 23.0 710 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 527.0 0.0 0.0 0.0 0.0 0.0 1144 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 9.0 0.0 124.0 11.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1459 0.0 0.0 2.0 0.0 1.0 0.0 75.0 0.0 1.0 13.0 0.0 1.0 2.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 5.0 0.0 0.0 0.0 1644 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 7.0 0.0 0.0 0.0 17.0 1.0 530.0 5.0 1.0 1809 0.0 0.0 32.0 0.0 2.0 1.0 429.0 1.0 1.0 102.0 2.0 137.0 0.0 0.0 43.0 0.0 0.0 0.0 0.0 0.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.0 6.0 6.0 5.0 4.0 10.0 11.0 2.0 24.0 13.0 230.0 13.0 45.0 16213 0.0 1.0 5.0 3.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 5.0 6.0 0.0 11.0 0.0 0.0 358.0 15.0 0.0 0.0 0.0 0.0 2.0 16363 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 12.0 0.0 1.0 0.0 0.0 0.0 122.0 0.0 0.0 4.0 16528 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 9.0 52.0 2.0 13.0 0.0 6.0 22.0 0.0 1.0 2.0 0.0 2.0 1.0 16806 15.0 6.0 12.0 3.0 1.0 2.0 43.0 7.0 10.0 21.0 10.0 76.0 25.0 18.0 45.0 6.0 55.0 509.0 40.0 19.0 44.0 128.0 13.0 170.0 16917 4.0 2.0 2.0 0.0 0.0 1.0 6.0 1.0 1.0 7.0 3.0 30.0 19.0 10.0 6.0 3.0 35.0 6.0 4.0 8.0 12.0 4.0 10.0 12.0 16952 2.0 0.0 0.0 0.0 0.0 1.0 38.0 0.0 0.0 57.0 0.0 136.0 0.0 0.0 0.0 0.0 0.0 4.0 0.0 0.0 0.0 0.0 0.0 3.0
Belmont, John W
2013-Aug-31 15:48 UTC
[R] How to plot a pretty heatmap with uneven distributed data?
normalize the data by rows and use the zscores (or some similar procedure) ________________________________________ From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of Wei Liu [messagetoliu at gmail.com] Sent: Saturday, August 31, 2013 4:29 AM To: r-help at r-project.org Subject: [R] How to plot a pretty heatmap with uneven distributed data? Dear All, I want to plot a heatmap with R, but my data distributed unevenly, for example, my data range from 10 to 1500, but most of the data smaller than 200, when I plot a heatmap, the colour is also distributed unevenly, most part of the heatmap is one colour, so the heatmap is ugly and meaningless. So can anybody help me plot a pretty heatmap for me with the attached data. I am looking forward your reply! Thansk very much. Best Regards. Wei Liu.
Jim Lemon
2013-Aug-31 22:04 UTC
[R] How to plot a pretty heatmap with uneven distributed data?
On 08/31/2013 07:29 PM, Wei Liu wrote:> Dear All, > > I want to plot a heatmap with R, but my data distributed unevenly, for > example, my data range from 10 to 1500, but most of the data smaller than > 200, when I plot a heatmap, the colour is also distributed unevenly, most > part of the heatmap is one colour, so the heatmap is ugly and meaningless. > > So can anybody help me plot a pretty heatmap for me with the attached data. > I am looking forward your reply! Thansk very much. >Hi Wei Liu, You would have to explain the transformation of your variables, but perhaps something like: library(plotrix) color2D.matplot(log(example_data+0.01),extremes=c("red","blue")) would do what you want. Jim