R 扩展'中的扇区高度;旋转';和其他最后的润色
每个人- 我在增加旋转图内向量的高度时遇到了一些问题。我希望它足够大,能够包含放大的标签(见图)。我主要是靠这个工作的。我还有一个问题,为什么与htat使用R 扩展'中的扇区高度;旋转';和其他最后的润色,r,circlize,R,Circlize,每个人- 我在增加旋转图内向量的高度时遇到了一些问题。我希望它足够大,能够包含放大的标签(见图)。我主要是靠这个工作的。我还有一个问题,为什么与htat使用chordDiagram()或中的示例生成的许多博客帖子相比,我的图看起来非常像素化。我在尝试为链接添加边框时遇到问题。任何其他格式提示将不胜感激。谢谢你的时间和建议 库(圆圈) df尝试在circos.par()内定义track.height 编辑 只需将annotationTrackHeight=c(0.03,0.01)更改为anno
chordDiagram()
或中的示例生成的许多博客帖子相比,我的图看起来非常像素化。我在尝试为链接添加边框时遇到问题。任何其他格式提示将不胜感激。谢谢你的时间和建议
库(圆圈)
df尝试在circos.par()内定义track.height
编辑
只需将annotationTrackHeight=c(0.03,0.01)
更改为annotationTrackHeight=0.08
即可实现此目的
ccircos.par(start.degree = 135,
track.margin = c(.01,0.01))
chordDiagram(df[,1:3],
order = c("BM","LSM", "SJC","SCM","ZM","MT","SMM","SM","TP","CHC","HSRM","SIN","GC","MR"),
grid.col = correlated_color,
#link.border = border.color,
#annotationTrackHeight = c(0.03, 0.01),
annotationTrackHeight = 0.08,
link.arr.type = "big.arrow",
link.arr.length = uh(3, "mm"),
link.rank = rank(df$value),
h.ratio = 0.8,
transparency = .5,
directional = 1,
diffHeight = -uh(1, "mm"),
direction.type = c("diffHeight", "arrows"),
annotationTrack = c("grid"),
preAllocateTracks = list(
list(track.height = 0.03)))
circos.trackPlotRegion(track.index = 2,
panel.fun = function(x, y) {
xlim = get.cell.meta.data("xlim")
ylim = get.cell.meta.data("ylim")
sector.index = get.cell.meta.data("sector.index")
circos.text(mean(xlim),
mean(ylim),
sector.index,
col = "white",
cex = 0.8,
facing = "bending.inside",
niceFacing = TRUE)
}, bg.border = NA)
for(p in unique(pop_id)) {
sub_pop = names(pop_id[pop_id == p])
highlight.sector(sector.index = sub_pop,
track.index = 1,
col = uncorrelated_color[p],
text = p,
font = 2,
text.vjust = -0.5,
niceFacing = TRUE)
}
尝试过,但没有骰子。谢谢你的建议。你是最好的,伯德明。这非常有效。谢谢你的帮助!
ccircos.par(start.degree = 135,
track.margin = c(.01,0.01))
chordDiagram(df[,1:3],
order = c("BM","LSM", "SJC","SCM","ZM","MT","SMM","SM","TP","CHC","HSRM","SIN","GC","MR"),
grid.col = correlated_color,
#link.border = border.color,
#annotationTrackHeight = c(0.03, 0.01),
annotationTrackHeight = 0.08,
link.arr.type = "big.arrow",
link.arr.length = uh(3, "mm"),
link.rank = rank(df$value),
h.ratio = 0.8,
transparency = .5,
directional = 1,
diffHeight = -uh(1, "mm"),
direction.type = c("diffHeight", "arrows"),
annotationTrack = c("grid"),
preAllocateTracks = list(
list(track.height = 0.03)))
circos.trackPlotRegion(track.index = 2,
panel.fun = function(x, y) {
xlim = get.cell.meta.data("xlim")
ylim = get.cell.meta.data("ylim")
sector.index = get.cell.meta.data("sector.index")
circos.text(mean(xlim),
mean(ylim),
sector.index,
col = "white",
cex = 0.8,
facing = "bending.inside",
niceFacing = TRUE)
}, bg.border = NA)
for(p in unique(pop_id)) {
sub_pop = names(pop_id[pop_id == p])
highlight.sector(sector.index = sub_pop,
track.index = 1,
col = uncorrelated_color[p],
text = p,
font = 2,
text.vjust = -0.5,
niceFacing = TRUE)
}