Description Usage Arguments Value Examples
View source: R/arrange_dendrogram.R
Arranges both dendrograms with heatmap.
1 2 3 4 5 6 7 8 | 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
1 2 3 4 5 6 7 8 9 10 11 12 | 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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.