[R] pie charts?

Marc Schwartz mschwartz at medanalytics.com
Thu Feb 13 23:34:03 CET 2003

>-----Original Message-----
>From: r-help-admin at stat.math.ethz.ch 
>[mailto:r-help-admin at stat.math.ethz.ch] On Behalf Of Joshua Gramlich
>Sent: Thursday, February 13, 2003 4:17 PM
>To: R-help at stat.math.ethz.ch
>Subject: [R] pie charts?
>I don't suppose it's possible to create a pie chart in R?  
>I've got 1500 some odd elements in a frame that are valued at 
>either -1, 0 or 1 and I'd like to find a reasonable way to 
>represent the distribution graphically...any ideas?
>Joshua Gramlich
>Piocon Technologies
>Chicago, IL

You can. See ?pie.

However, I believe the general disposition would be to not do so.

You would probably be better off with either a bar chart (see ?barplot
in base R or ?barplot2 in the gregmisc package) or perhaps a Cleveland
dot plot (see ?dotchart in base R) depending upon what you might wish
to show.  barplot2() has some additional features like plotting
confidence intervals if you wish to include these in your graphic.

The reasoning behind this is covered in W.S. Cleveland's "Elements of
Graphing Data" on pages 262 - 264 in the section dealing with what he
calls "Pop Charts".

Hope that helps,

Marc Schwartz

More information about the R-help mailing list