Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Tsgraph with multiple y axis


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: Tsgraph with multiple y axis
Date   Sun, 11 Oct 2009 13:43:59 +0200

<>

-tsgraph- sounds like you are using an old -version- of Stata? Note you are meant to disclose this from the FAQ. See http://www.stata-journal.com/article.html?article=st0080 , section 2.4., for more info (though I cannot access the archives today for some reason...)

The modern implementation is -tsline- which is a -twoway- and can thus be given a second axis...


**************
clear*
set obs 100

gen x=1
gen x1=3+.6*x[_n-1] + /*
*/ rnormal() in 2/l
gen x2=5+.6*x[_n-1] + /*
*/ rnormal() in 2/l
gen x3=50+.6*x[_n-1] + /*
*/ rnormal() in 2/l

gen time=_n
tsset time
twoway (tsline x1) (tsline x2)/*
*/  (tsline x3, yaxis(2))
**************


HTH
Martin


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Abhijit Sen Gupta
Sent: Sonntag, 11. Oktober 2009 13:15
To: [email protected]
Subject: st: Tsgraph with multiple y axis

Hi!
  I have three variables y1var y2var and y3var that I want to plot against time (in years). y3var has a very different scale than y1var or y2var so I was thinking if plotting it on a second y axis on the right with y1var and y2var on the left y axis. Is there a way of doing this using tsgraph?
Thanks
Abhijit 





      

*
*   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/



*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index