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

st: AW: Partially stacked bar graph?

From   "Martin Weiss" <>
To   <>
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


[] Im Auftrag von
Gesendet: Dienstag, 17. November 2009 16:48
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

*   For searches and help try:

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