arrange_dendrogram.Rd
Arranges both dendrograms with heatmap.
arrange_dendrogram( heatmap, dendrogram_top, dendrogram_right, top_right = NULL, widths = c(0.8, 0.2), heights = c(0.2, 0.8) )
heatmap | object containing heatmap plot |
---|---|
dendrogram_top | top dendrogram plot generated with
|
dendrogram_right | right dendrogram plot generated with
|
top_right | element placed in the top right part of the plot.
By default |
widths |
|
heights |
|
plot with heatmap and aligned dendrograms
library(ggplot2) data(example_data) dendro_top <- plot_dendrogram(d1) dendro_right <- plot_dendrogram(d2) + coord_flip() # Plot aligned dendrograms with legend at the bottom arrange_dendrogram(hm + theme_bw() + theme(legend.position = "bottom"), dendro_top + theme_void(), dendro_right + theme_void())# Plot aligned dendrograms with legend in the top right corner arrange_dendrogram(hm + theme_bw() + theme(legend.position = "none"), dendro_top + theme_void(), dendro_right + theme_void(), get_legend(hm))