在进行ggplot绘图的过程中,出现了“Error: stat_bin() must not be used with a y aesthetic.”的报错。
代码具体如下:
> ggplot(aes(x = gender, y = age),
+ data = subset(pf, !is.na(gender))) + geom_histogram()
Error: stat_bin() must not be used with a y aesthetic.
> ggplot(aes(x = age, y = friend_count),
+ data = subset(pf, !is.na(gender))) + geo