R: Adjusting Labels in circlize diagram

前端 未结 2 1123
傲寒
傲寒 2021-01-16 19:39

I have the code below which im trying to make into a circular diagram using the amazing package circlize

I have read the vigenette and admit some of it has gone over

2条回答
  •  猫巷女王i
    2021-01-16 20:01

    I was wondering if there is a quick way to remove all the labels on my diagram including tick marks and just add back in AUDI, VOLVO and BMW in light grey at the same angle to the sector as per this example

    You might try

    chordDiagram(df[1:2], col = col[df$Customer.Sat], diffHeight = diffHeight[df$Customer.Sat], annotationTrack = "grid", preAllocateTracks = 1)
    circos.trackPlotRegion(track.index = 1, panel.fun = function(x, y) {
      xlim = get.cell.meta.data("xlim")
      ylim = get.cell.meta.data("ylim")
      sector.name = get.cell.meta.data("sector.index")
      circos.text(mean(xlim), ylim[1] + .1, sector.name, facing = "clockwise", niceFacing = TRUE, adj = c(0, 0.5), col = "lightgray")
    }, bg.border = NA)
    

    which gives you

提交回复
热议问题