Page 1 of 1
Chart pool series syntax
Posted: Wed Mar 11, 2009 12:58 pm
by javiersan
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
Re: Chart pool series syntax
Posted: Wed Mar 11, 2009 1:29 pm
by EViews Gareth
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
Re: Chart pool series syntax
Posted: Wed Mar 11, 2009 1:54 pm
by mjmctaggart
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
Re: Chart pool series syntax
Posted: Wed Mar 11, 2009 3:02 pm
by javiersan
Thanks both for your suggestions.
Regards,
Javier
Re: Chart pool series syntax
Posted: Wed Mar 11, 2009 3:14 pm
by EViews Gareth
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.