getDataPanelBoundingBox: getDataPanelBoundingBox

Description Usage Arguments Details Value Note See Also Examples

View source: R/getDataPanelBoundingBox.R

Description

Return the bounding box of a data panel in plot coordinates

Usage

1
getDataPanelBoundingBox(karyoplot, data.panel)

Arguments

karyoplot

a karyoplot object returned by a call to plotKaryotype

data.panel

a valid data panel name (i.e. 1, 2, "ideogram", "all")

Details

Given a KaryoPlot object and a data.panel name, return the region where the data panel is placed. The returned values are in plot coordinates, that is, the coord.change.function has been applied.

Value

Returns a list with four elements (x0, x1, y0 and y1), each of them an integer with the plot coordinates for the data.panel

Note

A user is not expected to need this function. It is mainly used by plotting functions, specially when clipping the plot in a zoomed region.

See Also

plotKaryotype, kpDataBackground

Examples

1
2
3
kp <- plotKaryotype(plot.type=2)
dp1 <- getDataPanelBoundingBox(kp, 1)
 

karyoploteR documentation built on Nov. 8, 2020, 5:52 p.m.