ccTrack | R Documentation |
Object ccTrack will call the function circlize::circos.trackPlotRegion while drawing.
ccTrack(
sectors = NULL,
x = NULL,
y = NULL,
ylim = NULL,
force.ylim = TRUE,
track.index = NULL,
track.height = circos.par("track.height"),
track.margin = circos.par("track.margin"),
cell.padding = circos.par("cell.padding"),
bg.col = NA,
bg.border = "black",
bg.lty = par("lty"),
bg.lwd = par("lwd"),
panel.fun = function(x, y) {
NULL
},
factors = sectors
)
sectors |
A |
x |
Data on x-axis. It is only used if |
y |
Data on y-axis |
ylim |
Range of data on y-axis |
force.ylim |
Whether to force all cells in the track to share the same |
track.index |
Index for the track which is going to be created/updated. If the specified track has already been created, this function just updated corresponding track with new plot. If the specified track is |
track.height |
Height of the track. It is the percentage to the radius of the unit circles. The value can be set by |
track.margin |
only affect current track |
cell.padding |
only affect current track |
bg.col |
Background color for the plotting regions. It can be vector which has the same length of sectors. |
bg.border |
Color for the border of the plotting regions. It can be vector which has the same length of sectors. |
bg.lty |
Line style for the border of the plotting regions. It can be vector which has the same length of sectors. |
bg.lwd |
Line width for the border of the plotting regions. It can be vector which has the same length of sectors. |
panel.fun |
Panel function to add graphics in each cell, see "details" section and vignette for explanation. |
factors |
The same as |
Object ccTrack
library(circlizePlus)
n = 1000
df = data.frame(sectors = sample(letters[1:8], n, replace = TRUE),
x = rnorm(n), y = runif(n))
library(circlizePlus)
par1=ccPar("track.height" = 0.1)
cc=ccPlot(sectors = df$sectors, x = df$x) + par1
track1 = ccTrack(sectors = df$sectors, y = df$y,
panel.fun = function(x, y) {
circos.text(CELL_META$xcenter,
CELL_META$cell.ylim[2] + mm_y(5),
CELL_META$sector.index)
circos.axis(labels.cex = 0.6)
})
cc=cc+track1
cc
circos.clear()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.