-----Original Message-----
From: fgoetz [mailto:fgoetz at whoi.edu]
Sent: Friday, June 24, 2016 10:21 AM
To: Liaw, Andy
Subject: Heatmap.2 Breaks argument
Dear Mr. Liaw,
I am a Phd student at the Woods Hole Oceanographic Institution, MA, USA.
I found a problem with the breaks argument in the Heatmap.2 function,
which I dont understand. When I create a Heatmap with the following code
I have trouble to open the pdf because it takes a long time to load the
Histogram. When I leave out the break argument I have no problem at all.
Why is the break argument giving me this problem. I could not find any
information on that problem so I decided to write to you directly.
Thank you very much for any help!
Best regards,
Florian Goetz
value_breaks
<-c(seq(0,0.0001,length=1),seq(0.0002,3,length=10),seq(3.01,6.5,length=10))
### color breaks
my_palette<-colorRampPalette(c("white","darkblue","yellow"),
(n=length(value_breaks)-1))#
pdf(file.choose(new=TRUE),width=5,height=10)
#par(oma=c(2, 2, 2, 2))
par(mar=c(20,10,15,5))
heatmap.2(heatmapmatrix,
breaks=value_breaks,
symm=FALSE,trace="none",
col = my_palette,cexRow=0.5,cexCol=1,srtCol=45,
margins=c(10,8),
hclustfun = function(x) hclust(x,method = 'ward.D'),
distfun = function(x) vegdist(x,method = 'euclidean'))
dev.off() #Close the pdf file