Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Graphing question


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Graphing question
Date   Fri, 18 Jun 2004 11:48:28 +0100

Try -catplot- from SSC. 

. catplot bar regm year, asyvars stack 
	oversubopts(label(labsize(vsmall) ang(v)))

Nick 
n.j.cox@durham.ac.uk 

jdubas@nd.edu

> I am trying to make a stacked bar graph in Stata and can't 
> seem to get anywhere.
>  I have data for years 1973-2002, which I need on my x-axis.  
> What I am trying
> to do is the following:
> 
> My variable is "regm" that has a value of 1,2,3,4, 5 or 6 (or 
> missing).  For
> each year, I hope to count the occurrence of each value.  So 
> if in 1973, I have
> 30 (1's), 25(2's), 60 (3's), 80 (4's) 15 (5's) and 20 (6's), 
> my chart will
> stack these in one column with 6 distinct labels for 1973 
> (the bar will reach
> up to 230 on the vertical axis).  And I need to repeat this 
> for every year in
> this chart.
> 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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