On Tue, 2008-07-29 at 17:23 +0100, [EMAIL PROTECTED] wrote: > > I am looking to making a panel of pie charts fo some of my > > dritribution data . I was wondering if there is a way in any R > > package to write a small script to do so. > pie() will do you a one-off pie chart, but there is no equivalent using > grid/ lattice graphics. You could write a panel.pie function to draw > them, but be warned: pie charts are almost never the best option for > displaying data. (See > http://www.perceptualedge.com/articles/visual_business_intelligence/save_the_pies_for_dessert.pdf > > for example.) Have you considered using barcharts instead?
All concerns about pie charts aside, Deepayan has already done this for you, as part of his excellent book, Lattice: Multivariate data Visualization with R (2008) Springer, part of the UseR series. Check out the book's website for the code to reproduce all the figures: http://lmdvr.r-forge.r-project.org/figures/figures.html in particular you should look at chapter 14, figure 14.5 and the associated code, including panel functions, to reproduce this figure. HTH G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% ______________________________________________ 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.