Chapters and reference
Complete canonical API text; task articles explain the workflows. Usage guide

Add a genomic panel to a Fusion
Source:R/fusion.R
fusion_panel.RdAdd a genomic panel to a Fusion
Usage
R · Example code
fusion_panel(
plot,
id,
side = c("right", "top", "left", "bottom"),
size = NULL,
box = NULL,
angle = NULL,
distance = NULL
)Arguments
- plot
An independent ggchord genomic plot, another Fusion, or a Cartesian detail from
register_ggchord_alignment(). Dotplot, facets and unregistered external ggplots are not yet registered here. Character panels require explicit cross-panel fill; backbone-colour gradient is unavailable.- id
Unique nonempty panel name;
"center"is reserved.- side
One of right, top, left, bottom, topright, topleft, bottomright or bottomleft (one panel per named side), or auto for a bounded clockwise perimeter layout with any number of distinct panels that fit the canvas. Auto preserves explicit sizes and all fixed allocations; unlocked default containers may adapt with a 15 mm floor. Placement does not rescale fonts or rotate the child Coord. If no placement is feasible, the build fails explicitly.
- size
Optional fractional width and height. Out-of-frame allocations fail; overlap fails unless explicitly allowed by the composition.
- box
Optional explicit rectangle (xmin, xmax, ymin, ymax), optionally named in any order. Numeric values are fractions of the content area after native outer plot decorations and Guides; absolute grid units retain their physical size within that same frame. Use instead of side/size/angle/distance. Out-of-frame boxes fail at build.
- angle
Optional finite placement angle in degrees counterclockwise from the right, instead of side. Does not rotate the plot or its labels.
- distance
Positive radial distance from the centre allocation, as a fraction of half the shorter physical allocation dimension; default .8. Angles describe physical canvas directions even on rectangular devices. The allocation must fit without implicit clamping.
Value
A component for ggchord_fusion().
Examples
R · Example code
data(seq_data_example)
p <- ggchord(seq_data_example) + geom_seq()
ggchord_fusion(p) + fusion_panel(p + coord_collinear(), "right")
# \donttest{
quiet <- p + theme(legend.position = "none")
ggchord_fusion(quiet) +
fusion_panel(quiet + coord_sankey(), "mirror", angle = 31, distance = .8)
#> Warning: ggchord(): physical geometry did not converge within the bounded refinement budget; geometry measurements remain estimates. Inspect diagnose_ggchord() and consider a larger canvas or revised label/guide settings.
ggchord_fusion(quiet, center_box = c(.02, .35, .2, .8), allow_overlap = TRUE) +
fusion_panel(quiet + coord_collinear(), "inset", box = c(.25, .98, .3, .7))
# }