Bookmark and Share

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]

RE: st: RE: question on graphing a bar


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: RE: question on graphing a bar
Date   Fri, 18 May 2012 15:35:29 +0100

If you don't ask the real question, you may not get the real answer. 

This still isn't clear to me: How is each variable going to produce one and only one bar? 

Nick 
[email protected] 

Jian Zhang

Nick, it works. but what  i have is a data set of three variables, say
non-earned income, wage_income and self-employment income. what i
wanted is a bar chart where there is one bar for non-earned income,
then one bar for wage_income and one bar for self-employment income
but the two later bars were stacked. Note that all the observations
have values for the three variables. So it is not possible to use the
option of over.  Is there a way to graph a bar like this with the
data?

On Fri, May 18, 2012 at 10:05 PM, Nick Cox <[email protected]> wrote:
> Consider
>
> clear
> set obs 3
> gen cat = _n
> gen twothree = _n > 1
> gen y = runiform()
> graph bar (asis) y , over(cat) over(twothree) asyvars stack
>
> Nick
> [email protected]
>
> Jian Zhang
>
> I was trying to graph a vertical bar chart where there are three bars.
> but i wanted the second and third bars stacked. Does anyone know how
> to do this? thanks!
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index