Page 1 of 1

Chart with date axis from [t-x to t+x]

Posted: Thu Jan 27, 2011 9:17 am
by javiersan
Hello,

Is it possible to do this type of chart?
chart1.JPG
chart1.JPG (82.36 KiB) Viewed 6739 times
Thanks,

Javier

Re: Chart with date axis from [t-x to t+x]

Posted: Thu Jan 27, 2011 10:33 am
by EViews Gareth
There's nothing built in that will do it. You can do it with some trickery though. See below:

Code: Select all

create a 1970 2002 series NewZealand = rnd series Australia = rnd series Canada = rnd series uk = rnd 'use 1989 as the base year series Can1989 = canada series Aus1989 = australia series NZ1988 = newzealand(-1) series nz1996 = newzealand(+7) series uk1980 = uk(-9) group g can1989 aus1989 nz1988 nz1996 uk1980 smpl 1983 1995 freeze(gr) g.line alpha obslab = @str(@year-1989) gr.setobslabel(series) obslab show gr

Re: Chart with date axis from [t-x to t+x]

Posted: Thu Jan 27, 2011 11:13 am
by javiersan
Interesting way of doing it. Thanks.

Re: Chart with date axis from [t-x to t+x]

Posted: Thu Jan 27, 2011 11:26 am
by startz
But there should be a way to do this. Wanting to show before vs after "event" data is pretty common.

Re: Chart with date axis from [t-x to t+x]

Posted: Fri Jan 28, 2011 8:19 am
by javiersan
I am almost sure that the following chart is not possible to do without manual fiddling of the date axis with addtext(s) (as I was doing with the chart types above before Gareth's stunned me with his super simple solution). It could be great if these types of double date axis charts were built into future Eviews versions.
double_scale.JPG
double_scale.JPG (25.64 KiB) Viewed 6703 times

Cheers,

Javier

Re: Chart with date axis from [t-x to t+x]

Posted: Fri Jan 28, 2011 9:02 am
by EViews Gareth
Yeah, I can't think of another way to get that double scale. If we allowed carriage returns in obs labeling, it would be easy, but we don't :(