Chart pool series syntax

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Chart pool series syntax

Postby javiersan » Wed Mar 11, 2009 12:58 pm

Hi,

I have a pool of countries and I want to chart the same series for each member in one chart and I can't figure out the programming syntax.

pool ctry arg_ dom_ per_ bra_

The following combinations are not valid:
graph gr1.line(x) ?gdppc
graph gr1.ctry.line(x) ?gdppc
graph gr1.line(x) ctry.?gdppc

Any suggestions?

Thanks,

Javier

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

Re: Chart pool series syntax

Postby EViews Gareth » Wed Mar 11, 2009 1:29 pm

I don't believe we support graphs from pool objects like that.

Why not just put them into a group and graph the group?

Code: Select all

group group1 *gdppc freeze(gr1) group1.line

mjmctaggart
Posts: 7
Joined: Thu Jan 29, 2009 9:59 am

Re: Chart pool series syntax

Postby mjmctaggart » Wed Mar 11, 2009 1:54 pm

Javier,

One approach would be to try something like the following:

' *********************************************************
' Graph Desired Countries
' *********************************************************
graph graphcountry.line(panel="combine") gdppc_country1 gdppc_country2 gdppc_country3 ... gdppc_countryN

'set the color for each country's line
graphcountry.setelem(1) lcolor(black)
graphcountry.setelem(2) lcolor(red)
graphcountry.setelem(3) lcolor(blue)
graphcountry.setelem(N) lcolor(green)

'Add a title and identifying text for the axes
graphcountry.addtext(t) Country GDPPC Values
graphcountry.addtext(b) Date
graphcountry.addtext(l) GDPPC Values
' *******************************************************

It's not as elegant as being able to use gdppc? but should get the job done.

Matt

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Re: Chart pool series syntax

Postby javiersan » Wed Mar 11, 2009 3:02 pm

Thanks both for your suggestions.

Regards,

Javier

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

Re: Chart pool series syntax

Postby EViews Gareth » Wed Mar 11, 2009 3:14 pm

Of course an easier approach might just be to convert the pool into a panel workfile, which would open up a number of panel/pool specific graphing options.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests