Graph axes and saving to RTFs with color

For questions regarding programming in the EViews programming language.

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

fjoutz
Posts: 3
Joined: Thu Oct 30, 2008 12:25 pm

Graph axes and saving to RTFs with color

Postby fjoutz » Sun Jan 06, 2013 11:55 pm

I am using EViews 7.2
I have two issues.
First, I don't seem to be able to get vertical grids (gridt or gridb) in my graphs. I have tried using the ".axis" command and the ".options". For example here are two lines of code

fig_grp_{%ptype}_obsbyq.options gridpat(3) gridl

fig_grp_{%ptype}_obsbyq.options gridpat(3) gridt

I am able to get horizontal grids from left or right, but never top or bottom. The grid option "grid" gives an error meessage when replacing "gridl" in the first line

Second, when I save graphs to "RTF" files and import into MSWord, they are only in black and white. Below is an example of my code.

' *** Store to Spool ***
spool_{%fname}_fig.append fig_grp_f_4ci fig_grp_f_4mm fig_grp_lf_4ci fig_grp_lf_4mm
'==================================================================
'
' *** Save the Figures Spool to an RTF File
'
'==================================================================
spool_{%fname}_fig.save(t=rtf) spool_{%fname}_fig

Thanks for your help.
Fred

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

Re: Graph axes and saving to RTFs with color

Postby EViews Gareth » Mon Jan 07, 2013 8:58 am

Use:

Code: Select all

fig_grp_{%ptype}_obsbyq.options gridpat(3) gridt gridauto
to get the top grid lines

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Graph axes and saving to RTFs with color

Postby EViews Jason » Mon Jan 07, 2013 9:56 am

In regards to the second issue, when trying saving to rtf, EViews uses the color setting found in File->Print Setup. In the graph defaults box, you will find the 'Print in color' checkbox. Make sure that is checked.

fjoutz
Posts: 3
Joined: Thu Oct 30, 2008 12:25 pm

Re: Graph axes and saving to RTFs with color

Postby fjoutz » Sat Jan 12, 2013 11:02 pm

Thank you for the responses.
The for obtaining color in RTF files seems to work fine.
The other issue for obtaining grids for both axes is problematic. The suggested code works fine for a single graph, but when I try to use a group with multiple graphs it does not. I can obtain a grid for the left axis, but no others.
I have attached a sample program file and workfile.
Again, I am working with version 7.2
I appreciate your help
Fred


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest