Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

circos.updatePlotRegion

Update the plotting region in an existed cell


Description

Update the plotting region in an existed cell

Usage

circos.updatePlotRegion(
    sector.index = get.cell.meta.data("sector.index"),
    track.index = get.cell.meta.data("track.index"),
    bg.col = NA,
    bg.border = "black",
    bg.lty = par("lty"),
    bg.lwd = par("lwd"))

Arguments

sector.index

Index for the sector

track.index

Index for the track

bg.col

Background color for the plotting region

bg.border

Color for the border of the plotting region

bg.lty

Line style for the border of the plotting region

bg.lwd

Line width for the border of the plotting region

Details

You can update an existed cell by this function by erasing all the graphics. But the xlim and ylim inside the cell still remain unchanged.

Note if you use circos.track to update an already created track, you can re-define ylim in these cells.

Examples

circos.initialize(letters[1:8], xlim = c(0, 1))
circos.track(ylim = c(0, 1), panel.fun = function(x, y) {
    circos.text(CELL_META$xcenter, CELL_META$ycenter, CELL_META$sector.index)
})
circos.update(sector.index = "b", track.index = 1)
circos.rect(CELL_META$cell.xlim[1], CELL_META$cell.ylim[1],
            CELL_META$cell.xlim[2], CELL_META$cell.ylim[2],
            col = "#FF000080")
circos.clear()

circlize

Circular Visualization

v0.4.12
MIT + file LICENSE
Authors
Zuguang Gu
Initial release
2021-1-8

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.