Statalist


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

st: display all categories on pie chart for categorical variables (with some zero values)


From   Adam Collins <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: display all categories on pie chart for categorical variables (with some zero values)
Date   Wed, 25 Nov 2009 17:38:31 +0100

Hello, 

I have several categorical variables that each possess the same list of categories (value labels).  

To enable easy comparison of the pie charts, I would like every category to exist on every chart (so that each category retains the same colour/settings/legend position etc on each chart).

The problem is that some of the variables contain zero occurrences of certain values (categories) and the standard 'over(varname)' option with -graph pie- excludes categories with no occurrences.  I have tried the 'allcategories' option, but since it applies to the 'over()' variable, it does not help.

Does anyone have any ideas?  (by the way, since this is for a specific set of categorical variables, it is fine if the categories are 'hard coded', then applied to each variable)

Thanks again for your help!

Adam

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