![2bc842d1172834464c632af75ea7885c.png](https://i-blog.csdnimg.cn/blog_migrate/518c23b30a7c150e4de31202abcfb161.jpeg)
本文系统介绍ggplot2的统计变换( stat)、位置设置( Position adjustments)和标度( scale)。
本文目录
6、统计变换(stat)
stats can be created with a geom_ function
stats can’t be created with a geom_ function
7、 位置设置(Position adjustments)
条形图中stack|fill|dodge
散点图中nudge|jitter|jitterdodge
8、标度(scale)
marker的形状和大小
图例和坐标轴
6、统计变换(stat)
将data经过一种统计方法整理,然后再绘图,ggplot2的统计方法如下,都是以stat_开头的函数。
![9fe869a6ba2b6bb6b8b69eca5f05d1a3.png](https://i-blog.csdnimg.cn/blog_migrate/02aff9dfc56a9be6cee9526dc1932d66.jpeg)
可以分为两类:
stats can be created with a geom_
function
stat_bin()
:geom_bar()
,geom_freqpoly()
,geom_histogram()
stat_bin2d()
:geom_bin2d()
stat_bindot()
:geom_dotplot()
stat_binhex()
:geom_hex()
stat_boxplot()
:geom_boxplot()