Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Friedrich Huebler <fhuebler@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: graph axis scale |
Date | Wed, 12 Jan 2011 18:58:30 -0500 |
Rodrigo, The example below shows one way to adjust the range of the x-axis. sysuse tsline2 tsset day local tin1 "tin(01jan2002,31may2002)" local tin2 "tin(01apr2002,31dec2002)" forvalues i = 1/2 { tsline calories if `tin`i'', name(graph`i') } Friedrich On Wed, Jan 12, 2011 at 4:40 PM, Rodrigo Briceño <rjbriceno@gmail.com> wrote: > Hello statalisters. I'm using Stata 9.2 and windows XP. I have written > the following syntax in order to produce a set of twoway line graphs. > Everything works perfect except that the X-Scale of all the 10 series > used is the same (from 1 to 1112). My problem is that not all the 10 > series have the 1112 values (only 5 of them have all the 1112 values). > Is there a way to modify the graphs to show only the range of valid > values? I have structured my data file in a panel form. Thanks for > your help. > > gen resid = . > foreach i of local isin { > quietly regress liq `X' if isin2==`i' > predict ehat`i' if e(sample), res > twoway (tsline ehat`i'), name (gr_`b`i'') > graph export "D:\data\grafico_isin_`i'.wmf", replace > list ehat`i' if isin2==`i' > } > > -- > Rodrigo Briceño > Economist > rjbriceno@gmail.com > MSN: jbric98@hotmail.com > SKYPE: rbriceno1087 * * 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/