# 未加权
ggplot(midwest,aes(percwhite,percbelowpoverty))+
geom_point()
# 以人口加权
ggplot(midwest,aes(percwhite,percbelowpoverty))+
geom_point(aes(size=poptotal/1e6))+
scale_size_area("Population\n(millions)",breaks=c(05,1,2,4))
增加weight
ggplot(midwest,aes(percwhite,percbelowpoverty))+
geom_point(aes(size=poptotal/1e6))+
geom_smooth(aes(weight=poptotal),method = lm,size=1)+
scale_size_area(guide="none")