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: Question About Bar Graph Axes and Graph Combine
From
[email protected]
To
"[email protected]" <[email protected]>
Subject
Re: st: Question About Bar Graph Axes and Graph Combine
Date
Thu, 20 Jun 2013 18:24:15 +0100
You might think about restructuring your data to one response variable, an -over()- variable and a -by()- variable.
Nick
[email protected]
On 20 Jun 2013, at 15:57, Erika Kociolek <[email protected]> wrote:
> I would like to show to two different changes over time by a group
> variable using horizontal bar graphs. I'd like to combine the bar
> graphs so they are in the same plot.
>
> graph hbar changeovertime, over(group) ytitle("Change1 Over Time", size(small))
> save ../Graphs/Change_1.gph, replace
> graph hbar changeovertime2, over(group) ytitle("Change2 Over Time", size(small))
> save ../Graphs/Change_2.gph, replace
>
> graph combine save ../Graphs/Change_1.gph save ../Graphs/Change_2.gph
>
> When I run this code, the combined graph has the values of the group
> variable on the horizontal axis twice - one for the first graph, and
> one for the second. The group categories are exactly the same, so I am
> wondering if there a way to only list the values of the group variable
> on the first graph. Thank you for any advice you can provide.
>
> Best,
> Erika
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/