Modifying graphs in a loop

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

ral
Posts: 23
Joined: Tue Oct 21, 2014 2:44 pm

Modifying graphs in a loop

Postby ral » Fri Apr 24, 2015 5:09 am

I am creating a set of graphs in a loop that iterates over a set of countries. I would like to change the line width in each of the graphs to make them more legible.

Below is a code fragment that works. I tried inserting caicomp_{%x}.setelem(1) lwidth(2) into the loop below to increase the width of the lines, but it did not work. What am I missing?

Thank you.

for %x {%countries}

' Do some calculations....

smpl %start_caicomp %end_caicomp
freeze(caicompfig_{%x}) caicomp_{%x}.line
copy {%x}_m\caicompfig_{%x} figures_m\caicompfig_{%x}
smpl @all

next

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

Re: Modifying graphs in a loop

Postby EViews Gareth » Fri Apr 24, 2015 7:23 am

You have to use .setelem on the graph object, not the series.
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 5 guests