Skip to contents

This function stacks multiple plots horizontally. Unlike vstack_plot, the plots do not need to share a common region and can display different genomic regions side by side.

Usage

hstack_plot(..., widths = NULL)

Arguments

...

ggplot2 objects representing genome tracks or plots

widths

Relative widths of the plots (default: NULL, equal widths)

Value

A composite plot with horizontally stacked plots

Examples

if (FALSE) { # \dontrun{
track1 <- ez_coverage("signal.bw", "chr1:1000000-2000000")
track2 <- ez_coverage("signal.bw", "chr2:5000000-6000000")
track3 <- ez_coverage("signal.bw", "chr3:1000000-2000000")
p <- hstack_plot(track1, track2, track3)
p <- hstack_plot(track1, track2, track3, widths = c(2, 1))
} # }