2017-12-17 8 views
1

원의 중심 (a, b)는 원 방정식으로부터 유도 될 수 플롯 circos 텍스트를 추가찾기 센터

<a href="http://www.codecogs.com/eqnedit.php?latex=\inline&space;(x-a)^2&plus;(y-b)^2&space;=&space;r^2" target="_blank"><img src="http://latex.codecogs.com/gif.latex?\inline&space;(x-a)^2&plus;(y-b)^2&space;=&space;r^2" title="(x-a)^2+(y-b)^2 = r^2" /></a>

circos의 중심을 찾는 방법 줄거리의 중심에 줄거리를 삽입하고 텍스트를 삽입 하시겠습니까?

library(circlize) 
df10 <- data.frame(from = c("aaa", letters[2:6]), 
        to = c(letters[2:6], "aaa")) 


grid.col = c(aaa = "red", b = "green", c = "blue", 
      d = "grey", e = "grey", f = "grey") 
sector_order <- c("aaa", "b", "c", "d", "e", "f") 

chordDiagram(x = df10, 
      preAllocateTracks = list(list(track.height = max(strwidth(c(df10$from, df10$to))))), 
      grid.col = grid.col, 
      annotationTrack = c("grid"), 
      link.lwd = 2, 
      col = 1:6, 
      link.border =1:6, 
      link.lty = 1, 
      order = sector_order) 

# rotate sector label 
circos.track(track.index = 1, panel.fun = function(x, y) { 
    circos.text(CELL_META$xcenter, CELL_META$ylim[1], CELL_META$sector.index, 
       facing = "clockwise", niceFacing = TRUE, adj = c(0, 0.5), 
       cex = 3) 
}, bg.border = NA) # here set bg.border to NA is important 

circos.clear() 

enter image description here

답변

2

센터는 (0,0)입니다 그래서 당신은 할 수 있습니다 :

text(0,0,"Text here") 

enter image description here