Statalist


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

st: RE: AW: Partially stacked bar graph?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: AW: Partially stacked bar graph?
Date   Tue, 17 Nov 2009 18:24:34 -0000

-catplot- is a user-written program from SSC. 

See also -slideplot- from SSC. 

Nick 
[email protected] 

Martin Weiss

sysuse auto, clear
gen byte biggerthan3=rep>3
la def mylab 0 "rep78 less than 4" 1 "rep78 more than 3",modify
la val biggerthan3 mylab
catplot bar rep78 bigger, by(foreign) percent(foreign) stack asyvars

[email protected]

I have some four category variables coded: strongly approve, approve,
disapprove, and strongly disapprove. I'd like to construct bar graphs to
show frequency distributions for each variable by categories of a second
(3
category) variable. I can do this with catplot but I'd like something a
little different. I'd like to show the frequencies in two stacked bars:
one
showing approve and strongly approve and the other disapprove and
strongly
disapprove. This way readers can easily see the percentages approving
and
disapproving as well as strength. Can anyone suggest how to construct
such a
partially stacked bar graph? It's easy to show separate bars for each of
the
four categories or a single stacked bar but I can't see how to show two
partial bars. 

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