diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 93466787..0f582ef9 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -3,5 +3,5 @@ pkgdown: 1.5.1 pkgdown_sha: ~ articles: circlize: circlize.html -last_built: 2020-10-14T19:43Z +last_built: 2020-10-18T17:41Z diff --git a/docs/reference/circos.axis.html b/docs/reference/circos.axis.html index 700f13cd..09b85755 100644 --- a/docs/reference/circos.axis.html +++ b/docs/reference/circos.axis.html @@ -226,13 +226,13 @@

See a

https://jokergoo.github.io/circlize_book/book/graphics.html#axes

Examples

-
factors = letters[1:8] +
sectors = letters[1:8] circos.par(points.overflow.warning = FALSE) -circos.initialize(factors = factors, xlim = c(0, 10))
circos.trackPlotRegion(factors = factors, ylim = c(0, 10), track.height = 0.1, +circos.initialize(sectors, xlim = c(0, 10))
circos.trackPlotRegion(sectors, ylim = c(0, 10), track.height = 0.1, bg.border = NA, panel.fun = function(x, y) { circos.text(5, 10, get.cell.meta.data("sector.index")) })
-circos.trackPlotRegion(factors = factors, ylim = c(0, 10))
circos.axis(sector.index = "a")
circos.axis(sector.index = "b", direction = "inside", labels.facing = "outside")
circos.axis(sector.index = "c", h = "bottom")
circos.axis(sector.index = "d", h = "bottom", direction = "inside", +circos.trackPlotRegion(sectors, ylim = c(0, 10))
circos.axis(sector.index = "a")
circos.axis(sector.index = "b", direction = "inside", labels.facing = "outside")
circos.axis(sector.index = "c", h = "bottom")
circos.axis(sector.index = "d", h = "bottom", direction = "inside", labels.facing = "reverse.clockwise")
circos.axis(sector.index = "e", h = 5, major.at = c(1, 3, 5, 7, 9))
circos.axis(sector.index = "f", h = 5, major.at = c(1, 3, 5, 7, 9), labels = c("a", "c", "e", "g", "f"), minor.ticks = 0)
circos.axis(sector.index = "g", h = 5, major.at = c(1, 3, 5, 7, 9), labels = c("a1", "c1", "e1", "g1", "f1"), major.tick = FALSE, @@ -246,8 +246,8 @@

Examp factors = letters[1] circos.par("gap.degree" = 0, "cell.padding" = c(0, 0, 0, 0), "start.degree" = 90) -circos.initialize(factors = factors, xlim = c(0, 12)) -circos.trackPlotRegion(factors = factors, ylim = c(0, 1), bg.border = NA) +circos.initialize(sectors, xlim = c(0, 12)) +circos.trackPlotRegion(sectors, ylim = c(0, 1), bg.border = NA) circos.axis(sector.index = "a", major.at = 0:12, labels = "", direction = "inside", major.tick.length = mm_y(3)) circos.text(1:12, rep(0.5, 12), 1:12, facing = "downward") diff --git a/docs/reference/circos.initialize.html b/docs/reference/circos.initialize.html index 77983df0..d6911ce8 100644 --- a/docs/reference/circos.initialize.html +++ b/docs/reference/circos.initialize.html @@ -121,10 +121,11 @@

Initialize the circular layout

circos.initialize(
-    sectors = NULL, factors = sectors,
+    sectors = NULL,
     x = NULL,
     xlim = NULL,
-    sector.width = NULL)
+ sector.width = NULL, + factors = sectors)

Arguments

diff --git a/docs/reference/circos.lines.html b/docs/reference/circos.lines.html index da0fe8c0..d209ae79 100644 --- a/docs/reference/circos.lines.html +++ b/docs/reference/circos.lines.html @@ -215,9 +215,9 @@

Details area to TURE.

Examples

-
factors = letters[1:9] +
sectors = letters[1:9] circos.par(points.overflow.warning = FALSE) -circos.initialize(factors = factors, xlim = c(0, 10))
circos.trackPlotRegion(factors = factors, ylim = c(0, 10), track.height = 0.5)
+circos.initialize(sectors, xlim = c(0, 10))
circos.trackPlotRegion(sectors, ylim = c(0, 10), track.height = 0.5)
circos.lines(sort(runif(10)*10), runif(10)*8, sector.index = "a")
circos.text(5, 9, "type = 'l'", sector.index = "a", facing = "outside")
circos.lines(sort(runif(10)*10), runif(10)*8, sector.index = "b", type = "o")
circos.text(5, 9, "type = 'o'", sector.index = "b", facing = "outside")
circos.lines(sort(runif(10)*10), runif(10)*8, sector.index = "c", type = "h")
circos.text(5, 9, "type = 'h'", sector.index = "c", facing = "outside")
diff --git a/docs/reference/circos.par.html b/docs/reference/circos.par.html index 0870d692..91b97aab 100644 --- a/docs/reference/circos.par.html +++ b/docs/reference/circos.par.html @@ -180,8 +180,11 @@

Details the region. So if some points are out of the plotting region, circlize would continue drawing the points and printing warnings. In some cases, draw something out of the plotting region is useful, such as draw some legend or text. Set this value to FALSE to turn off the warnings.

-
circle.margin

Margin in the horizontal direction and in the vertical direction. The value should be a positive numeric vector of length two - and the values are the fraction to the unit circle. So A value of c(x, y) means circos.par(canvas.xlim = c(-1, 1)*(1+x), canvas.ylim = c(-1, 1)*(1+y)).

+
circle.margin

Margin in the horizontal and vertical direction. The value should be a positive numeric vector + and the length of it should be either 1, 2, or 4. When it has length of 1, it controls the margin on the four sides of the circle. + When it has length of 2, the first value controls the margin on the left and right, and the second value controls + the margin on the bottom and top side. When it has length of 4, the four values controls the margins on the left, right, bottom and top sides + of the circle. So A value of c(x1, x2, y1, y2) means circos.par(canvas.xlim = c(-(1+x1), 1+x2), canvas.ylim = c(-(1+y1), 1+y2)).

canvas.xlim

The coordinate for the canvas. Because circlize draws everything (or almost everything) inside the unit circle, the default canvas.xlim and canvas.ylim for the canvas would be all c(-1, 1). However, you can set it to a more broad interval if you want to draw other things out of the circle. By choosing proper @@ -218,7 +221,7 @@

Examp #> cell.padding 0.02, 1, 0.02, 1 #> track.height 0.2 #> points.overflow.warning TRUE -#> circle.margin 0, 0 +#> circle.margin 0, 0, 0, 0 #> canvas.xlim -1, 1 #> canvas.ylim -1, 1 #> major.by.degree 10 diff --git a/docs/reference/circos.polygon.html b/docs/reference/circos.polygon.html index f271dc95..c688dc79 100644 --- a/docs/reference/circos.polygon.html +++ b/docs/reference/circos.polygon.html @@ -158,8 +158,8 @@

Details

Examples

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) { +sectors = letters[1:4] +circos.initialize(sectors, 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) diff --git a/docs/reference/circos.rect.html b/docs/reference/circos.rect.html index 23469e56..5b547e08 100644 --- a/docs/reference/circos.rect.html +++ b/docs/reference/circos.rect.html @@ -172,7 +172,7 @@

Details

This function can be vectorized.

Examples

-
circos.initialize(fa = c("a", "b", "c", "d"), xlim = c(0, 10))
circos.track(ylim = c(0, 10), panel.fun = function(x, y) { +
circos.initialize(c("a", "b", "c", "d"), xlim = c(0, 10))
circos.track(ylim = c(0, 10), panel.fun = function(x, y) { for(rot in seq(0, 360, by = 30)) { circos.rect(2, 2, 6, 6, rot = rot) } diff --git a/docs/reference/circos.text.html b/docs/reference/circos.text.html index 1f436ea9..3f72229e 100644 --- a/docs/reference/circos.text.html +++ b/docs/reference/circos.text.html @@ -200,9 +200,9 @@

See a

Examples

-
factors = letters[1:4] +
sectors = letters[1:4] circos.par(points.overflow.warning = FALSE) -circos.initialize(factors = factors, xlim = c(0, 10))
circos.trackPlotRegion(factors = factors, ylim = c(0, 10), +circos.initialize(sectors, xlim = c(0, 10))
circos.trackPlotRegion(sectors, ylim = c(0, 10), track.height = 0.5, panel.fun = function(x, y) { circos.text(3, 1, "inside", facing = "inside", cex = 0.8) circos.text(7, 1, "outside", facing = "outside", cex = 0.8) diff --git a/docs/reference/circos.trackHist.html b/docs/reference/circos.trackHist.html index 5fb1dc80..7e811bad 100644 --- a/docs/reference/circos.trackHist.html +++ b/docs/reference/circos.trackHist.html @@ -121,7 +121,7 @@

Draw histogram in cells among a whole track

circos.trackHist(
-    sectors, factors = sectors,
+    sectors,
     x,
     track.height = circos.par("track.height"),
     track.index = NULL,
@@ -140,7 +140,8 @@ 

Draw histogram in cells among a whole track

right = TRUE, draw.density = FALSE, bin.size = NULL, - area = FALSE)
+ area = FALSE, + factors = sectors)

Arguments

@@ -242,10 +243,10 @@

See a

Examples

# \donttest{ x = rnorm(1600) -factors = sample(letters[1:16], 1600, replace = TRUE) -circos.initialize(factors = factors, x = x)
circos.trackHist(factors = factors, x = x, col = "#999999", - border = "#999999")
circos.trackHist(factors = factors, x = x, bin.size = 0.1, - col = "#999999", border = "#999999")
circos.trackHist(factors = factors, x = x, draw.density = TRUE, +sectors = sample(letters[1:16], 1600, replace = TRUE) +circos.initialize(sectors, x = x)
circos.trackHist(sectors, x = x, col = "#999999", + border = "#999999")
circos.trackHist(sectors, x = x, bin.size = 0.1, + col = "#999999", border = "#999999")
circos.trackHist(sectors, x = x, draw.density = TRUE, col = "#999999", border = "#999999")
diff --git a/docs/reference/circos.trackLines.html b/docs/reference/circos.trackLines.html index 67154f47..72b2e3ee 100644 --- a/docs/reference/circos.trackLines.html +++ b/docs/reference/circos.trackLines.html @@ -122,7 +122,6 @@

Add lines to the plotting regions in a same track

circos.trackLines(
     sectors,
-    factors = sectors,
     x, y,
     track.index = get.current.track.index(),
     col = par("col"),
@@ -136,7 +135,8 @@ 

Add lines to the plotting regions in a same track

baseline = "bottom", pt.col = par("col"), cex = par("cex"), - pch = par("pch"))
+ pch=par("pch"), + factors=sectors)

Arguments

diff --git a/docs/reference/circos.trackPlotRegion.html b/docs/reference/circos.trackPlotRegion.html index 1105df9a..b56f7b00 100644 --- a/docs/reference/circos.trackPlotRegion.html +++ b/docs/reference/circos.trackPlotRegion.html @@ -121,7 +121,7 @@

Create plotting regions for a whole track

circos.trackPlotRegion(
-    sectors = NULL, factors = sectors,
+    sectors = NULL,
     x = NULL, y = NULL,
     ylim = NULL,
     force.ylim = TRUE,
@@ -133,7 +133,8 @@ 

Create plotting regions for a whole track

bg.border = "black", bg.lty = par("lty"), bg.lwd = par("lwd"), - panel.fun = function(x, y) {NULL})
+ panel.fun=function(x, y) {NULL}, + factors=sectors)

Arguments

diff --git a/docs/reference/circos.trackPoints-1.png b/docs/reference/circos.trackPoints-1.png index 41cad8ee..beede1ff 100644 Binary files a/docs/reference/circos.trackPoints-1.png and b/docs/reference/circos.trackPoints-1.png differ diff --git a/docs/reference/circos.trackPoints.html b/docs/reference/circos.trackPoints.html index f394f5b2..6e3cf626 100644 --- a/docs/reference/circos.trackPoints.html +++ b/docs/reference/circos.trackPoints.html @@ -122,13 +122,13 @@

Add points to the plotting regions in a same track

circos.trackPoints(
     sectors,
-    factors = sectors,
     x, y,
     track.index = get.current.track.index(),
     pch = par("pch"),
     col = par("col"),
     cex = par("cex"),
-    bg = par("bg"))
+ bg=par("bg"), + factors=sectors)

Arguments

@@ -180,9 +180,9 @@

Details

This function can be replaced by a for loop containing circos.points.

Examples

-
circos.initialize(letters[1:8], xlim = c(0, 1))
df = data.frame(fa = sample(letters[1:8], 100, replace = TRUE), +
circos.initialize(letters[1:8], xlim = c(0, 1))
df = data.frame(sectors = sample(letters[1:8], 100, replace = TRUE), x = runif(100), y = runif(100)) -circos.track(ylim = c(0, 1))
circos.trackPoints(df$fa, x = df$x, y = df$y, pch = 16, col = as.numeric(factor(df$fa)))
+circos.track(ylim = c(0, 1))
circos.trackPoints(df$sectors, x = df$x, y = df$y, pch = 16, col = as.numeric(factor(df$fa)))
circos.trackText(
-    sectors, factors = sectors,
+    sectors,
     x, y,
     labels,
     track.index = get.current.track.index(),
@@ -132,7 +132,8 @@ 

Draw text in cells among the whole track

adj = par("adj"), cex = 1, col = par("col"), - font = par("font"))
+ font=par("font"), + factors=sectors)

Arguments

diff --git a/docs/reference/circos.triangle.html b/docs/reference/circos.triangle.html index c827ac03..9c38b6b8 100644 --- a/docs/reference/circos.triangle.html +++ b/docs/reference/circos.triangle.html @@ -157,7 +157,7 @@

Arg

Examples

-
circos.initialize(fa = c("a", "b", "c", "d"), xlim = c(0, 10))
circos.track(ylim = c(0, 10), panel.fun = function(x, y) { +
circos.initialize(c("a", "b", "c", "d"), xlim = c(0, 10))
circos.track(ylim = c(0, 10), panel.fun = function(x, y) { circos.triangle(c(2, 2), c(2, 8), c(8, 8), c(2, 8), c(5, 5), c(8, 2)) diff --git a/docs/reference/circos.yaxis.html b/docs/reference/circos.yaxis.html index cd2af2b4..8178906b 100644 --- a/docs/reference/circos.yaxis.html +++ b/docs/reference/circos.yaxis.html @@ -200,10 +200,10 @@

Details

Examples

op = par(no.readonly = TRUE) -factors = letters[1:8] +sectors = letters[1:8] circos.par(points.overflow.warning = FALSE) circos.par(gap.degree = 8) -circos.initialize(factors = factors, xlim = c(0, 10))
circos.trackPlotRegion(factors = factors, ylim = c(0, 10), track.height = 0.5)
par(cex = 0.8) +circos.initialize(sectors, xlim = c(0, 10))
circos.trackPlotRegion(sectors, ylim = c(0, 10), track.height = 0.5)
par(cex = 0.8) for(a in letters[2:4]) { circos.yaxis(side = "left", sector.index = a) }
for(a in letters[5:7]) {