3.13 统计摘要
ggplot(diamonds,aes(color))+geom_bar()
ggplot(diamonds,aes(color,price))+
geom_bar(stat = "summary_bin",fun.y=mean)
ggplot(diamonds,aes(table,depth))+
geom_bin2d(binwidth=1,na.rm=T)+
xlim(50,70)+
ylim(50,70)
ggplot(diamonds,aes(table,depth,z=price))+
geom_bin2d(binwidth=1,stat = "summary_2d",fun=mean,na.rm=T)+
xlim(50,70)+
ylim(50,70)