inst/examples/diamonds-polar.R

# 钻石雕琢水平的极坐标条形图
data("diamonds")
library(ggplot2)
levels(diamonds$cut) = c("一般", "良好", "优质", "珍贵", "完美")
p = ggplot(aes(x = cut, fill = cut), data = diamonds) +
  coord_polar() +
  geom_bar(width = 1, show.legend = FALSE) +
  labs(x = "切工", y = "频数")
print(p)

Try the MSG package in your browser

Any scripts or data that you put into this service are public.

MSG documentation built on July 22, 2021, 1:06 a.m.