我对 ggplot2 包有疑问。使用菱形数据,我无法分辨以下三组代码的区别。
qplot(color, data = diamonds, geom = "bar")
qplot(color, data = diamonds, geom = "bar", weight = carat) +
scale_y_continuous("carat")
qplot(color, carat, data=diamonds, geom="bar",
stat = "identity", position = "identity") +
theme(legend.position = "none")