Open WenxuLiu opened 2 years ago
I have met the same problem!!! It really confused me as well because I have tried pheatmap with gaps_col (for adding some gaps, which functions nicely) so I thought there could be some problem remained after I change my code, maybe bottom layer code or sth.
my code is like:
pheatmap::pheatmap(mat, cluster_rows = F,cluster_cols = F, gaps_col=NULL, show_colnames = F, annotation_col = colanno, annotation_colors = mycolors, color = viridis(20), filename="DE_Heatmap.png",width=16,height = 20 )
All the other parameters work well. The 'gaps_col=NULL' is added after the unwanted white gap reoccured but nothing really changes.
Hi @WenxuLiu and @KforKuma, was this issue ever resolved? I am having the same exact issue as well with similar plotting code. Thanks.
In case this is useful to anyone, this issue was fixed for me when I used the development version of ComplexHeatmap (v 2.13.1), which has a wrapper to pheatmap
. I think it's because there's a function that specifically checks for white space and fills them in with the appropriate colors. (validate_raster_matrix
in Heatmap-draw_component.R).
The same solution also worked for another user here.
@repeatpipettor I have the same problem! Do you wrap the oncoprint output in pheatmap?
this problem confuses me for a long time I use pheatmap to draw a 10000* 2000(more or less) size matrix , final plot will show some blank(white) lines inserting to the row and col of my main plot in most of the time, like some cut-off rules to my main plot.
I have checked my data , it has no NA rows or cols. And this cut-off lines will change position when adjusting the resolution of the plot. wheather ploting directly in Rstudio window or generating the plot file in work path, this problem can not be avoided either.
I guess this problem may due to the plot system of R or the resolution or Pheatmap, if someone can sovle this, I would appreciate it greatfully.
Thank you.