我想把这个堆积条形图转换成R的圆形图。
但脚本here仅用于分组条形图(如您在圆圈中心所见:A、B、C、D)。
如何将此堆叠条形图转换为圆形图?
以下是我的数据:
df.bar <- data.frame(Gene.name=c('Gene1','Gene1','Gene1','Gene2','Gene2','Gene2','Gene3','Gene3','Gene3',
'Gene4','Gene4','Gene4'),
Alteration.frequency=c(0.0909, 2.1838, 0.6369, 0.1819, 1.0919, 0.3639, 0.4549,0.7279,
0.7279, 0.000, 0.3639, 0.4549),
Alteration.Type=c("Deep deletion", "Amplification", "Point mutation", "Deep deletion",
"Amplification", "Point mutation", "Deep deletion", "Amplification" ,
"Point mutation", "Deep deletion", "Amplification" , "Point mutation"))
谢谢你的帮助。
1条答案
按热度按时间oknwwptz1#
条形图中只有四个列,因此如果将这些列堆叠在一起,圆形图看起来会很奇怪(它会呈十字形)。我想如果我用数据制作圆形图,我会避开填充变量: