circos.updatePlotRegion {circlize} | R Documentation |
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()
[Package circlize version 0.4.16 Index]