Hi Jim, exactly what we are expecting. Thanks a lot for your efforts... it should be really helpful!
On Wed, Mar 24, 2010 at 10:50 PM, Jim Lemon <j...@bitwrit.com.au> wrote: > On 03/25/2010 06:00 AM, Gurmeet wrote: > >> Hi All, >> >> I'm trying to find out a way to plot multi-panel pie charts. It may not be >> the best way to present data, but I would still need one. >> >> Hi Gurmeet, > Your message prompted me to finish a little function that I had almost > forgotten. > > panes<-function(nrow=2,ncol=2,mar=c(0,0,1.6,0),oma=c(2,1,1,1)) { > oldpar<-par("mar","mfrow","oma") > par(mfrow=c(nrow,ncol),mar=mar,oma=oma) > return(oldpar) > } > oldpar<-panes() > pie(foo$value[foo$month=="Jan"],labels=foo$variable[foo$month=="Jan"], > radius=0.7) > tab.title("January sales",tab.col="#cccc66") > box() > pie(foo$value[foo$month=="Feb"],labels=foo$variable[foo$month=="Feb"], > radius=0.7) > tab.title("February sales",tab.col="#cccc66") > box() > pie(foo$value[foo$month=="Mar"],labels=foo$variable[foo$month=="Mar"], > radius=0.7) > tab.title("March sales",tab.col="#cccc66") > box() > pie(foo$value[foo$month=="Apr"],labels=foo$variable[foo$month=="Apr"], > radius=0.7) > tab.title("April sales",tab.col="#cccc66") > box() > par(xpd=TRUE) > mtext("First quarter sales",at=-1.2,line=0.8,side=1,cex=1.5) > par(xpd=FALSE) > par(oldpar) > > Is this what you wanted? > > Jim > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.