Closed xiangpin closed 7 months ago
donut_radius
bg_circle_radius
> library(ggplot2) > d <- data.frame(x=rnorm(5), y=rnorm(5)) > d$A <- abs(rnorm(5, sd=1)) > d$B <- abs(rnorm(5, sd=2)) > d$C <- abs(rnorm(5, sd=3)) > d <- tidyr::gather(d, key="letters", value="value", -x:-y) > p1 <- ggplot() + geom_scatterpie( mapping = aes(x=x, y=y), data=d, cols="letters", long_format=TRUE, donut_radius=.5 ) + coord_fixed() > p1
> p2 <- ggplot() + geom_scatterpie( mapping = aes(x=x, y=y), data=d, cols="letters", long_format=TRUE, donut_radius = .5, bg_circle_radius = 1.2 ) + coord_fixed() > p2
donut_radius
controls the radius of the internal circle (relative to the radius of the pie)bg_circle_radius
controls the radius of the external circle (relative to the radius of the pie)