R geom_scatterpie


scatter pie plot.

geom_scatterpie is located in package scatterpie. Please install and load package scatterpie before use.


geom_scatterpie(mapping = NULL, data, cols, pie_scale = 1,
sorted_by_radius = FALSE, legend_name = "type", ...)

mapping
aes mapping
data
data
cols
cols the pie data
pie_scale
amount to scale the pie size if there is no radius mapping exists
sorted_by_radius
whether plotting large pie first
legend_name
name of fill legend
...
additional parameters


install.packages("scatterpie", repo="http://cran.r-project.org", dep=T)
library(scatterpie)
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))
ggplot() + geom_scatterpie(aes(x=x, y=y), data=d, cols=c("A", "B", "C")) + coord_fixed()

Return Values: layer


endmemo.com © 2024  | Terms of Use | Privacy | Home