Newbie ggplot2 question. I'm trying to make a facet grid of pie
charts and vary the size (radius) of the pie chart according to a
fourth variable.
Here's the code I'm currently using:
mydata <- data.frame(side1=rep(LETTERS[1:3],3,each=9),side2=rep(LETTERS[1:3],9,each=3),widget=rep(c("X","Y","Z"),9*3),val=runif(9*3),strength=rep(c(1,2,3),3,each=3))
ggplot(mydata, aes(x="",y = val, fill = widget)) +
geom_bar(position="fill") + facet_grid(side1 ~ side2) +
coord_polar("y") + opts(axis.text.x = theme_blank())
Adding width=strength to the aes doesn't do anything.
Thanks for any help,
Dave S.