getDataPanelBoundingBox {karyoploteR} | R Documentation

## getDataPanelBoundingBox

### Description

Return the bounding box of a data panel in plot coordinates

### Usage

    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

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

[Package karyoploteR version 1.20.3 Index]