Question on graphing panel data

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

mamo
Posts: 127
Joined: Wed Nov 07, 2012 9:11 am

Question on graphing panel data

Postby mamo » Wed Jul 31, 2019 8:00 am

Dear Eviewers

graphing panel data using the "line" command with the option "p=stack" generates a line chart which shows the series as ordered first along the cross sections and secondly along the time dimension.

In the example code shown below this would be 1-2000 1-2001 1-2002 ... 1-2010 2-2000 2-2001 ... 2-2010 3-2000 3-2001, etc.

I am looking for an approach which allows showing the data as ordered along the time dimension first and only secondly along the cross sections secondly, providing 1-2000 2-2000 3-2000 1-2001 2-2001 3-2001, 1-2002 etc.

Is there a way approach to achieve this?

Best, mamo

Code: Select all

wfcreate a 2000 2010 4
series x=nrnd
graph gra.line(panel=stack) x
show gra

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12295
Joined: Tue Sep 16, 2008 5:38 pm

Re: Question on graphing panel data

Postby EViews Gareth » Wed Jul 31, 2019 8:22 am

Only with trickery.

Code: Select all

wfcreate a 2000 2010 4
series x=nrnd

alpha t = @datestr(@date, "YY")
series cx = @crossid

pagestruct t cx

graph gra.line(panel=stack) x
show gra
Follow us on Twitter @IHSEViews

mamo
Posts: 127
Joined: Wed Nov 07, 2012 9:11 am

Re: Question on graphing panel data

Postby mamo » Wed Jul 31, 2019 8:39 am

Many thanks - works, but gives rise to an ugly observation labeling (though this can be rectified by making cx a appropriately defined alpha series as well).

This leads me to suggest an improvement: implement an additional panel option - such as "panel=interleave" - to the respective graphics commands in an upcoming version of EVIEWS.

Best, Matthias


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 5 guests