Align plot to ggheatmap
align_to_hm.RdAlign 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.
Usage
align_to_hm(
gghm,
gplot,
pos = "bottom",
newplt_size_prop = 0.5,
legend_action = "collect",
tag_level = "new"
)Arguments
- gghm
A object with class ggheatmap, generated by
ggheatmap().- gplot
Another object of class ggplot, that shares either columns (if
pos='top'orpos='bottom') or rows (ifpos='left') with the heatmap. Note: to create the gplot, make sure you usegghmData()to get the data, or alternativelyget_rowLevels()orget_colLevels().- pos
One of 'top', 'bottom' or 'left'.
- newplt_size_prop
A float between 0 and 1, that indicates the proportion of the height (if
pos='top'orpos='bottom') or width (ifpos='left') that the new plot will occupy in the panel.- legend_action
A string specifying how guides should be treated in the layout. See: guides in
patchwork::plot_layout().- tag_level
A string ('keep' or 'new') to indicate how auto-tagging should behave. See patchwork::plot_annotation.