ggforce
绘制饼图
-
开始和结束位置定义geom_arc_bar
geom_arc_bar(aes(x0,y0,r0,r,start,end,explode), data,
stat = "arc_bar",position = "identity",
n = 360, na.rm = FALSE) -
区块的大小定义geom_arc_bar
geom_arc_bar(aes(x0,y0,r0,r, amount,explode), data,
stat = "pie",position = "identity",
n = 360, na.rm = FALSE) -
开始和结束位置定义geom_arc
geom_arc(aes(x0,y0,r0,r,start,end), data ,
stat = "arc",position = "identity",
n = 360, arrow = NULL, lineend ="butt"/“round”/”square”,
na.rm = FALSE)
参数:
x0,y0,r0,r: 圆心,内半径,外半径
explode: 突出显示变量
# We'll start by defining some dummy data |
绘制圆
circles <- data.frame( |
评论