Statalist


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

st: AW: Partially stacked bar graph?


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Partially stacked bar graph?
Date   Tue, 17 Nov 2009 16:56:51 +0100

<> 

You did not post html, did you? :-)


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



HTH
Martin

Von: [email protected]
[mailto:[email protected]] Im Auftrag von
[email protected]
Gesendet: Dienstag, 17. November 2009 16:48
An: [email protected]
Betreff: st: Partially stacked bar graph?

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. Thanks in advance for your help.

Stanley Feldman

*******************************************
Stanley Feldman
Department of Political Science
Stony Brook University
Stony Brook, NY 11794-4392
(631) 632-9761
email: [email protected]

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