【发布时间】:2019-09-15 02:04:47
【问题描述】:
我在 r 中有以下数据框
Equipment Area Count
RTG 1 12
RTG 2 13
STS 1 34
STS 2 33
RTG 3 22
STS 3 21
我想用设备绘制多面饼图并在饼图中计算编号。
我在 R 中使用以下代码
ggplot(data = test) +
geom_bar(aes(x = "", y = Count, fill = Area),
stat = "identity") +
geom_text(aes(x = "", y = Count, label = count),position =
position_fill(width=1))+
coord_polar(theta = "y") +
facet_grid(Equipment ~ ., scales = "free")
但是,它不会产生任何图形。
【问题讨论】:
标签: r