在 ggplot2 中,这应该可以解决问题:
library("ggplot2")
df <- data.frame(a = c(4, 3, 3, 8, 1, 1, 10),
b = c("x", "x", "x", "y", "y", "y", "z"),
c = c("x1", "x2", "x3", "y1", "y2", "y3", "z1"))
ggplot(df, aes(x = b, y = a, fill = c))+
geom_bar(stat = "identity")+
coord_polar(theta="y")
Run Code Online (Sandbox Code Playgroud)
我希望这有帮助。干杯
| 归档时间: |
|
| 查看次数: |
5763 次 |
| 最近记录: |