raivokolde / pheatmap

Pretty heatmaps
225 stars 83 forks source link

Hard-coded pdf inside pheatmap function causes issues and unwanted behavior in a knitting context +bugfix #77

Open chrarnold opened 3 years ago

chrarnold commented 3 years ago

I found that the hard-coded lines pdf(file = NULL) and dev.off() before and after the heatmap_motor call cause a big issue when being in a knitting + PDF context. That is, when calling pdf() before calling pheatmap, the hard-coded pdf() messes up the knitting and causes unwanted and hard to understand behavior. By removing these two lines, I was able to successfully work with pheatmap and pdf both inside and outside of Rmds.

I propose to change this and provide a fix to it soon, thank you! It seems easy to fix :)

I can provide more details if needed.