我使用 circlize 包在 R 中创建了一个和弦图。我注意到这个图形没有被保存为 ggplot 对象。我正在尝试使图形成为对象,以便可以将其导出到 Excel。有什么建议么?
chordDiagram(as.data.frame(ba_delivery_flow.sas7bdat), annotationTrack = "grid", preAllocateTracks = 1,
direction.type = "diffHeight")
circos.trackPlotRegion(track.index = 2, 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]+5, sector.name, facing = "clockwise", niceFacing = TRUE, adj = c(0, .5), cex = 1)
circos.axis(h = "top", labels.facing = "clockwise", labels.cex = 0.5, major.tick.percentage = 0.2, sector.index = sector.name, track.index = 2)
}, bg.border = NA)