Statalist


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

Re: st: Pie Chart Color Scheme


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Pie Chart Color Scheme
Date   Wed, 14 Jan 2009 08:17:41 +0000 (GMT)

--- [email protected] wrote:
> One of the pie charts has four groups while the other pie charts have
> five groups (the group with four has zero for one of its levels of
> the "dog" variable).
> How can I create a unified color scheme where a is always red, b is  
> always blue, c is always yellow, d is always green, and e is always  
> purple for the four pie charts 

*--------- begin example -----------
sysuse auto, clear
graph pie, over(rep78) by(foreign)
*----------- end example -----------

However, you won't find much sympathy for the pie chart on this list.
The information you want to convey is codified in angles, and we humans
are very bad at deciphering/comparing angles. We are much better at
comparing distances (not by any means perfect, but we are better much
better at comparing distances than at comparing angles). A nice
alternative is the spineplot (implemented in Stata by Nick Cox), which
codifies the primary information (in my example: proportions in repair
status categories) in distances. It also codifies another bit of
information in distances, namely the proportions foreign and domestic
cars. It codifies secondary information, the relative sizes of the
repair status by foreign groups, as areas. 

*-------- begin example ---------
sysuse auto, clear
ssc install spineplot
spineplot rep78 foreign
*--------- end example ----------

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room N515

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index