align_heatmaps.Rd
Align a ggheatmap object to another ggplot that shares either its columns or rows to form complex panels. This function is called internally by add_tracks, and also exported by ggheatmap.
align_heatmaps(
hm1,
hm2,
pos = "horizontal",
legend_action = NULL,
tag_level = "new"
)
first heatmap
second heatmap
(if pos='top' or pos='bottom') or rows (if pos='left') with the heatmap.
Note: to create the gplot, make sure you use gghmData()
to get the data, or
alternatively get_rowLevels()
or get_colLevels()
.
'vertical' or 'horizontal', by default the best option. of the height (if pos='top' or pos='bottom') or width (if pos='left') that the new plot will occupy in the panel.
A string specifying how guides should be treated in the layout.
See: guides in patchwork::plot_layout()
.
A string ('keep' or 'new') to indicate how auto-tagging should behave. See patchwork::plot_annotation.
A joined panel object of class ggheatmap.