Chart in dated panel: how to collect crossid first and date second?

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: 191
Joined: Wed Nov 07, 2012 9:11 am

Chart in dated panel: how to collect crossid first and date second?

Postby mamo » Mon Sep 28, 2020 2:29 am

Dear Eviewers,

I use Eviews 11 Sept 2019 built.

Is there an approach to collect crossids before dates in charts in a dated panel workpage? (See example code below)

Best, mamo

Code: Select all

wfcreate a 2000 2010 2
series x=@trend*(3-2*@crossid)
smpl 2009 2010
' The following line creates a bar chart in which the dates are collected first, and crossids second
' (I.e., it shows x for both crossids in 2009, and then x for both crossids in the year 2010)
bar(panel=combined) x
'How can one generate a bar chart in which the crossids come first, and date second?
'I.e., show x for crossid 1 in the years 2009 and 2010, and x for crossid 2 in the years 2009 and 2010?

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

Re: Chart in dated panel: how to collect crossid first and date second?

Postby mamo » Mon Sep 28, 2020 2:35 am

Sorry, I mixed it up, so correction of my request:

I am looking for an approach to make date appear first in the chart, and crossid second (see example code below, comments changed)
Best, mamo,

Code: Select all

wfcreate a 2000 2010 2
series x=@trend*(3-2*@crossid)
smpl 2009 2010
' The following line creates a bar chart in which crossid comes first, date second
' I.e., it shows x for crossid 1 in 2009 and 2010, and then x for crossid 2 in both years
bar(panel=combined) x
'So how to generate a bar chart in which the date comes first, and crossid second?
' (I.e., collect x for year 2009 for crossid 1 and 2 and then x for 2010 collect for 1 and 2 )?

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

Re: Chart in dated panel: how to collect crossid first and date second?

Postby mamo » Mon Sep 28, 2020 3:05 am

Strangely, I have also observed the following behavior (well, note that this does not solve my original request):

The following code invoked from the command line provides a different chart than the same code invoked from a program

Code: Select all

bar(panel=combined) x

Still, strangely enough, the above line invoked from the command line indeed provides a merged chart with two separated panels, one for each crossid, (i.e. crossids are again ordered first). While the same code invoked in a program provides the same ordering - crossids come first, dateid comes second - the output looks different: it yields a single chart with a single x-axis.

(PS: is there a way to generate the same look using a program as from the command line?)

Best, mamo


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 18 guests