Entering edit mode
4.6 years ago
tianshenbio
▴
180
I currently have four heatmaps generated by pheatmap()
: hp1.hp2.hp3, and hp4.
I know that these heat maps can be combined in one canvas using grid.arrange()
. But how can I use a common legend for all heatmaps? This can be achieved using ggarrange()
when setting common.legend = TRUE
.However, since these heatmaps are not ggplot items, ggarrange()
cannot be used. What should I do?
did you try grid package? @ tianshenbio
Hi, I used the grad.arrange() function from gridExtra package. I just tried to mute the legends of each individual figure and added a common one for the whole plot, it worked well. Thank you