“绘图函数里的stat参数表示对样本点做统计的方式,默认为identity,表示一个x对应一个y,同时还可以是bin,表示一个x对应落到该x的样本数。”说白了就是,identity提取横坐标x对应的y值,bin提取横坐标x的频数。
资料来源:http://www.cnblogs.com/muchen/p/5279727.html
下面是R帮助中的说明:
“If you have presummarised data, use <code>stat="identity" to turn off the default summary. Sometimes, bar charts are used not as a distributional summary, but instead of a dotplot. Generally, it's preferable to use a dotplot (see geom\_point) as it has a better data-ink ratio. However, if you do want to create this type of plot, you can set y to the value you have calculated, and use stat='identity'.”
资料来源:http://127.0.0.1:10246/library/ggplot2/html/geom_bar.html