【发布时间】:2018-05-10 06:18:50
【问题描述】:
我在使用多面饼图时遇到问题。
这是我的数据集的头部。
> head(pie)
piper prop bat
1 P. sancti-felicis 0.617593433 Cs
2 P. reticulatum 0.617593433 Cs
3 P. colonense 0.069142205 Cs
4 P. multiplinervium 0.007650765 Cs
5 P. peltatum 0.006790803 Cs
6 P. umbricola 0.102377661 Cs
这是我正在尝试的代码...
a <- ggplot(pie, aes(x = piper,y=prop, fill = piper)) +
+ geom_bar(width = 1,stat='identity')
b <- a + coord_polar(theta = "y", start = 0, direction = 1)
b + facet_grid(facets=. ~ bat)
当我想显示一个按颜色分隔吹笛者的常规饼图时,它似乎显示在一个 coxcomb 饼图中。三个饼图被 bat 正确分隔。非常感谢您的建议!
【问题讨论】: