ggplot2: piecharts instead of points in an xy scatterplot
问题 I have a four-dimensional dataset, let's call the variables x, y, z and r. There is at most one entry for each combination of x and y. Currently, I have a scatterplot where I plot for each entry a point at position (x,y) and size z. ggplot(aes(x=x,y=y)) + geom_point(aes(size=z)) This produces a nice plot, but now I would like to "upgrade" it as follows: I want to replace each point with a piechart, and the piechart should be the same size as the point. The pie consists of two sections, one