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: Graphing mean and median on the same plot
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Graphing mean and median on the same plot
Date
Sun, 9 Mar 2014 12:27:09 +0000
Some technique:
webuse grunfeld, clear
graph bar (mean) invest (median) invest, over(year)
graph dot (mean) invest (median) invest, over(year) ///
legend(order(1 "mean" 2 "median")) vertical ytitle("investment")
collapse (mean) mean=invest (median) median=invest, by(year)
line mean median year
Nick
[email protected]
On 8 March 2014 19:35, Theophilus Dapel <[email protected]> wrote:
> Dear Contributors,
> I'm working on stacked datasets for 5 periods separated by years.
> How do I plot only the mean and the median on the same plot - sort of a multiple bar chart such that the years on the horrizontal axis while the mean and median values on the vertical axis.
>
> Thanks,
> Dapel
> *
> * 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/