0
votes

I'm working on pie charts in R. I need to create about 8 pie charts with the aim of lining them up all together in order to tell a story.

Is there a way of plotting 8 pie charts at once so it appears on the plots together?

The obvious alternative is run each pie chart once at a time and combine them that way. Thanks

1
ggplot and facetMatt
Or par(mrfrow=c(2,4)) in base R graphicsG5W

1 Answers

2
votes

Use par

par(mfrow=c(4,2))
a <- c(10, 15,20, 25, 3)
b <- c("A", "B", "C", "D", "E")
pie(a, labels = b)
pie(a, labels = b)
pie(a, labels = b)
pie(a, labels = b)
pie(a, labels = b)
pie(a, labels = b)
pie(a, labels = b)
pie(a, labels = b)