0

I would like to be able to combine a plotrix chart with a ggplot chart uisng grid.arrange.

I can save the image of the ggplot2 using this:

p<-ggplot(mtcars, aes(x=xyl, y=mgp)) + geom_point()

library(plotrix)
slices <- c(10, 12, 4, 16, 8) 
lbls <- c("US", "UK", "Australia", "Germany", "France")
pie3D(slices,labels=lbls,explode=0.1, main="Pie Chart of Countries 

how would I save the output of pie3d to p1 and use grid.arrange(p, p1)?

user1471980
  • 10,127
  • 48
  • 136
  • 235
  • 1
    I think you just need to adjust for your needs answers given in this [SO question](http://stackoverflow.com/questions/14124373/combine-base-and-ggplot-graphics-in-r-figure-window) – Didzis Elferts Mar 04 '13 at 15:07
  • Standard Comment: please do not use pie charts. Ever. No matter what. Their information-to-space (or -to-ink) ratio is the lowest of any chart type out there. – Carl Witthoft Mar 04 '13 at 15:36

0 Answers0