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

st: RE: AW: Partially stacked bar graph?

From   "Nick Cox" <>
To   <>
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. 


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

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
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:
showing approve and strongly approve and the other disapprove and
disapprove. This way readers can easily see the percentages approving
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
four categories or a single stacked bar but I can't see how to show two
partial bars. 

*   For searches and help try:

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