前面介绍ggplot2是基于图层图形语法(the Grammar of Graphics),一张完整图由不同图层叠加而成,本文介绍几何对象图层(geom layer),续前篇:
![]()
ggplot2中geom可分为个体几何对象(Individual geoms)及群组几何对象(Collective geoms),二者区别:
1、个体几何对象(Individual geoms)
An individual geom draws a distinct graphical object for each observation (row).【一个观测值对应一个图形】 Each of these geoms is two dimensional and requires both x
and y
aesthetics,these geoms are the fundamental building blocks of ggplot2.