Description Usage Arguments Details References Examples
Draw polygon
1 2  | circos.polygon(x, y, sector.index = get.cell.meta.data("sector.index"),
    track.index = get.cell.meta.data("track.index"), ...)
 | 
x | 
 Data points on x-axis  | 
y | 
 Data points on y-axis  | 
sector.index | 
 Index for the sector  | 
track.index | 
 Index for the track  | 
... | 
 pass to   | 
similar as polygon.
Note: start point should overlap with the end point,
Gu, Z. (2014) circlize implements and enhances circular visualization in R. Bioinformatics.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  | set.seed(123)
factors = letters[1:4]
circos.initialize(factors, xlim = c(0, 1))
circos.trackPlotRegion(ylim = c(-3, 3), track.height = 0.4, panel.fun = function(x, y) {
    x1 = runif(20)
    y1 = x1 + rnorm(20)
    or = order(x1)
    x1 = x1[or]
    y1 = y1[or]
    loess.fit = loess(y1 ~ x1)
    loess.predict = predict(loess.fit, x1, se = TRUE)
    d1 = c(x1, rev(x1))
    d2 = c(loess.predict$fit + loess.predict$se.fit,
        rev(loess.predict$fit - loess.predict$se.fit))
    circos.polygon(d1, d2, col = "#CCCCCC", border = NA)
    circos.points(x1, y1, cex = 0.5)
    circos.lines(x1, loess.predict$fit)
})
circos.clear()
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.