This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Removing White Lines In Heatmap

Hello all,

I'm trying to plot a heatmap using the heatmap.2 function from the 'Gplots' package.I'm getting some unwanted white lines separating some of the rows and columns. Can somebody help me out to get rid of these lines? The code and the plot are as follows:

Heatmap

Thanks in Advance

heatmap.2(my.mat,
Rowv=TRUE,
Colv=FALSE,
dendrogram= c("row"),
scale="none",
distfun = dist,
hclustfun = hclust,
key=TRUE,
keysize=1,
trace="none",
density.info=c("none"),
margins=c(15, 20),
col=redgreen(75),
sepwidth=c(0,0),
cexRow=1.00    
)
r heatmap

Hi, try to print your heatmap in a file, it could be an artifact from the graphic device.

I had the same problem and by changing the size while using png() I was able to remove the white lines, even if you change the size by 1 pixel. Another question: are-you using png() or dev.opy()?

I'm using png()

1 answer

The plot works fine with R version 2.12.1

Log in to answer this question.