Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: bar graph question
From
Jeph Herrin <[email protected]>
To
[email protected]
Subject
st: bar graph question
Date
Sat, 20 Feb 2010 16:17:41 -0500
I have a categorical variable, -var-, which takes 5 values.
I would like a bar graph which has a bar representing the %
in each category. Eg, if this is my variable
var1 | Freq. Percent Cum.
------------+-----------------------------------
Excellent | 278 24.26 24.26
Very Good | 526 45.90 70.16
Acceptable | 282 24.61 94.76
Poor | 54 4.71 99.48
Failing | 6 0.52 100.00
------------+-----------------------------------
Total | 1,146 100.00
I would like the graph to have the first bar labelled Excellent
and be 24% high; the second labelled "Very Good" and be 46% high,
etc. Five bars.
I know I can get there by collapsing or reshaping the data, but
it seems like this should be a trivial graph to produce directly.
If so, how? If not, why not?
thanks,
Jeph
*
* 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/