我使用circlize
包绘制了以下图。红色圆圈是之后绘制的单位圆,使用plotrix
. 我想在红色单位圆之外绘制第一条轨道。出于这个原因,我更改canvas.xlim
为. 但是,这不起作用。任何想法如何增加情节的圆半径?canvas.ylim
c(-1.2, 1.2)
circlize
注意:或者,如果轨道在单位圆之外而不是在内部,这对我来说就足够了。
library(circlize)
set.seed(2)
n = 10
a = data.frame(factor = "dummy",
x = rnorm(n, 100, sd=10))
circos.par(track.height = 0.2,
canvas.xlim=c(-1.2, 1.2), # bigger canvas?
canvas.ylim=c(-1.2, 1.2)) # bigger canvas?
circos.initialize(factors = a$factor,
x = a$x, xlim = c(0, 360))
lim <- c(-1.2, 1.2)
plot(NULL, asp=1, xlim=lim, ylim=lim)
circos.trackHist(a$factor, a$x, col = "blue", bg.col = grey(.95))
plotrix::draw.circle(0,0,1, border="red", lwd=2) # unit circle