我在r
中有以下数据框 Equipment Area Count
RTG 1 12
RTG 2 13
STS 1 34
STS 2 33
RTG 3 22
STS 3 21
我想绘制带有设备的刻面饼图,并在饼图中计算nos。
我在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")
但是,它不会产生任何图形。