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: twoway line
From
"Lynn Lee" <[email protected]>
To
<[email protected]>
Subject
st: twoway line
Date
Tue, 4 Sep 2012 18:08:35 +0800
Dear all,
I am trying to draw two variables in one graph, with each variable having
its own scale. For example, value of var1 ranges from 100 to 150, value of
var2 from -10 to 10. So, this graph has two y-axes. My command is
"twoway line(var1 year,yaxis(1 2) xaxis(1)) (line var2 year),
ylabel(100(10)150,axis(1) angle(0)) ylabel(-10(5)10,axis(2) angle(0)) " . I
also tried "twoway line(var1 year,yaxis(1 2) xaxis(1)) (line var2 year),
yscale(axis(1) range(100 150)) yscale(axis(2) range(-10 10))
ylabel(100(10)150,axis(1) angle(0)) ylabel(-10(5)10,axis(2) angle(0)) ". But
the graph shows var1 on the top, var2 at the bottom, since Stata takes the
-10 value as default starting scale for var1, and 150 as default max scale
for var2. In this case, the time trend of variables are not clear. My
question is, how to set the scale to let each variable having its own
stating and max scales, then, the time trend of will be shown in the middle
of the graph?
I appreciate for any helpful suggestion .
Best Regards,
Lynn Lee
*
* 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/