Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Nick Cox <njcoxstata@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: only display top 5 results in pie graph |

Date |
Wed, 18 Apr 2012 16:18:06 +0100 |

I am not fond of pie charts, but there is a partial defence. 1. They are so familiar to many audiences that they will go down easily. 2. People tend to be quite good at some comparisons, particularly if pie slices are about 50% or about 25%. This may be a side-effect of hungry meal-times when young or when sharing dessert with Stata developers. Naturally, there are negatives, including 3. You should be so lucky that your data are so simple. It's all too common to have lots of small slices and decoding relative or absolute sizes is then hard work. Bar charts work better. 4. Multiple pie charts usually don't work at all. You are supposed to compare slice by slice??? 5. Even with a single pie chart there is often not enough space to avoid an awkward multicolour display and a legend. In principle people know that they can go back and forth between legend and pie, but usually don't bother. If you haven't met it before: the rule let one child cut and the other choose the first slice is a good one. No graphical application though. Nick On Wed, Apr 18, 2012 at 3:59 PM, Rob Ploutz-Snyder <robploutzsnyder@gmail.com> wrote: > I couldn't agree more with Nick on favoring a bar chart over a pie > chart. I see no use for pie charts, unless the slices are made of > real pie, and it's at the dinner table.. > > "I'll take that slice of cheese cake over there please. Yes--the one > representing about 15% of the whole..." > > Sorry.. just had to do it. > Rob > > > > On Mon, Apr 16, 2012 at 2:01 PM, Nick Cox <njcoxstata@gmail.com> wrote: >> My main suggestion is that you would be better off with a horizontal >> bar chart, which would show 20 or so bars without much difficulty, >> quite apart from other advantages. >> >> That said, some technique can be gleaned from this example. >> >> sysuse auto, clear >> collapse (sum) price-foreign >> xpose, clear varname >> gsort -v1 >> graph pie v1 in 1/5, over(_varname) sort >> >> su v1 >> local sumall = r(sum) >> su v1 in 1/5 >> replace v1 = `sumall' - r(sum) in 6 >> replace _varname = "others" in 6 >> graph pie v1 in 1/6, over(_varname) sort >> >> Nick >> >> On Fri, Apr 13, 2012 at 4:43 PM, tashi lama <ltashi32@hotmail.com> wrote: >> >> I have a dataset containing 15 variables. When I draw a pie >> chart, it looks really messy because of large no of variables. Does >> anyone have any idea to have a pie chart displaying only the top 5 >> results? Rank is total values of observations. Thanks in advance.. >> * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: only display top 5 results in pie graph***From:*tashi lama <ltashi32@hotmail.com>

**Re: st: only display top 5 results in pie graph***From:*Nick Cox <njcoxstata@gmail.com>

**Re: st: only display top 5 results in pie graph***From:*Rob Ploutz-Snyder <robploutzsnyder@gmail.com>

- Prev by Date:
**Re: st: only display top 5 results in pie graph** - Next by Date:
**Re: st: Probabilities as predictor variables** - Previous by thread:
**Re: st: only display top 5 results in pie graph** - Next by thread:
**st: Bootstrap for xtregar or xtabond2** - Index(es):