raivokolde / pheatmap

Pretty heatmaps
225 stars 83 forks source link

bordor_color only works when providing filename #55

Open joost823 opened 5 years ago

joost823 commented 5 years ago

I want black border between my cells. This works fine when calling pheatmap() with the filename argument. However, when using the png() function directly or when viewing the image interactively in rstudio, the borders are not being drawn.

Example:

library(pheatmap)
sample_matrix <- matrix(nrow=200, ncol=200, data=1:40000)

png('matrix1.png', height=3100, width=3100)
pheatmap(sample_matrix, border_color='black')
dev.off()

pheatmap(sample_matrix, border_color='black', filename='matrix2.png', height = 10, width=10)

matrix1.png: matrix1

matrix2.png: matrix2