根据其绘图理念,图形由以下几个模块组成:
简单来说:
一张统计图形就是从数据到几何对象(geometric object,缩写geom)的图形属性(aesthetic attribute,缩写aes)...此外,图形中还可能包含数据的统计变换(statistical transformation,缩写stats),最后绘制在某个特定的坐标系(coordinate system,缩写coord)中,而分面(...geom_text(aes(label = value),
position = position_stack(vjust = 0.5),size=5) #vjust=0.5在堆叠柱子的中间位置添加文字...,可通过r0和showPieName设置
另外,r1,r2分别可以调整内外环的半径
PieDonut(acs,aes(Dx,smoking),r0=0,showPieName=FALSE)
# r1,r2...分别可以调整内外环的半径
PieDonut(acs,aes(Dx,smoking),r0=0.2,r1=0.8,r2=1.4,explode=1,start=pi/2,explodeDonut=TRUE