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: Bar and line graph problem
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Bar and line graph problem
Date
Fri, 28 Feb 2014 15:16:47 +0000
"the same" means "absolutely identical"?
Here is a sandpit to play in:
. sysuse auto
(1978 Automobile Data)
. collapse (mean) turn trunk, by(rep78)
. l
+---------------------------+
| rep78 turn trunk |
|---------------------------|
1. | 1 41 8.5 |
2. | 2 43.375 14.625 |
3. | 3 41.0667 15.2667 |
4. | 4 38.5 13.5 |
5. | 5 35.6364 11.4545 |
|---------------------------|
6. | . 37.6 11.4 |
+---------------------------+
. twoway bar turn rep78 || line trunk rep78
. twoway bar turn rep78
. twoway bar turn rep78 || line trunk rep78 , ysc(r(0 .))
Please relate your discussion to that, or any other reproducible
example of your choice.
Nick
[email protected]
On 28 February 2014 15:04, Beatrice Crozza <[email protected]> wrote:
> Dear All,
>
> I have an issue in overlying (not combining) a bar and a line graph.
>
> When I do them separately, everything is fine, however, when I overly
> the line to the bar, as a result I have that all the bars become the
> same.
>
> What I am doing wrong?
>
> This is the code:
> twoway (bar D dow, yaxis(1) yscale(range(0))) (line amrt1 dow, sort yaxis(2))
>
> Thank you very much for your help.
>
> Bea
> *
> * 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/