Page 1 of 1

Saving graphs as pdf

Posted: Thu Aug 31, 2023 2:02 am
by Dag Kolsrud
When making graphs, they look the same in EViews 12 and 13. But I have to use EViews 12 when I save (print to disk) the graphs as pdf to get the same look in pdf as in EViews. If I use EViews 13 and save the graphs, the lines get a different and ugly look as pdf. Is that due to EViews or Windows?

Re: Saving graphs as pdf

Posted: Thu Aug 31, 2023 2:02 pm
by EViews Steve
Some screenshots would be helpful.

Re: Saving graphs as pdf

Posted: Fri May 31, 2024 2:47 am
by Dag Kolsrud
I have enclosed two screen shots of two spools generated by the same EViews program written by me. The only difference is that the program generating the spools was run on two different versions of EViews: EViews 12 and EViews13. Each spool was saved on disk by the manual EViews menu operations Object->Print->Printer: Microsoft Print to PDF. The resulting pdf-files are also enclosed. The pdf-files show all graphs in the spools, not only the graphs in the screen shots of the spools displayed in EViews.

The graphs are ok in the spool and pdf file generated by EView 12, but not in the spool and pdf-files generated by EViews 13. In the latter, the dashing is different (and missing in Fig 2.17) in the spool, and looks terrible in the pdf. In the pdf the lines are missing in the legend.

I wonder if the problems could be due to EViews using functions in the Windows operating system differently in the two versions 12 and 13. I am looking forward to your answer.

Sincerely, Dag

Re: Saving graphs as pdf

Posted: Fri May 31, 2024 3:24 am
by Dag Kolsrud
One spool did not make it into the previous reply

Re: Saving graphs as pdf

Posted: Fri May 31, 2024 7:26 am
by EViews Steve
As mentioned in a previous post, EViews 13 has a new opacity setting that defaults to being ON which might be the cause of your dashed line problem.

Try turning off opacity for your graph line to see if that fixes it.

Code: Select all

mygraph.setelem(1) lineopacity(off) 'turns off line opacity

Re: Saving graphs as pdf

Posted: Wed Jun 05, 2024 12:21 am
by Dag Kolsrud
Unfortunately, the command lineopacity(off) does not change anything. Do you have any other potential explanation or do I have to continue doing the graphing in Eviews 12?

Re: Saving graphs as pdf

Posted: Wed Jun 05, 2024 7:28 am
by EViews Steve
Did you turn off line opacity for each line in your graph? My code was only meant to be an example, but your graph seems to have multiple lines. If you still can't see any changes, please send me an EViews workfile and program that can reproduce the error you're seeing. Once I can replicate the issue, I'll look into fixing it.

Re: Saving graphs as pdf

Posted: Tue Jun 18, 2024 1:09 am
by Dag Kolsrud
Please find a workfile and a program that graphs series in the workfile. The program can be run by EViews12 and 13, but it is necessary to comment/uncomment lines to (de)activate the OPACITY command which only EViews 13 accepts.

Re: Saving graphs as pdf

Posted: Tue Jun 18, 2024 7:41 am
by EViews Steve
Thanks for the info. I was able to reproduce the issue you're seeing. I'll take a closer look to see if there's a fix or a workaround.

Re: Saving graphs as pdf

Posted: Tue Jun 18, 2024 10:07 am
by igor
Interesting example. Try fillopacity(off) instead of lineopacity(off) for the first two lines.

Re: Saving graphs as pdf

Posted: Tue Jun 18, 2024 10:52 am
by EViews Steve
I've confirmed the issue seems to remain, even after using both fillopacity(off) and lineopacity(off) for all graph elements.

Visually, it seems like the dashes are scaled too large on the PDF, even though they look fine in the graph window. Changing the dashed-line type to a larger dash makes the problem even more pronounced in the PDF.

For now, I think you'll have to make do with the PNG output instead. We'll try to address this issue within the next few weeks.

Re: Saving graphs as pdf

Posted: Tue Jun 10, 2025 10:31 am
by tvonbrasch
I wanted to check if there have been any updates or fixes regarding the PDF export issues with dashed lines and legends in EViews graphs. Is there any new information on when this might be addressed?

Re: Saving graphs as pdf

Posted: Fri Apr 17, 2026 6:14 am
by Dag Kolsrud
In Statistics Norway we try to use Eviews as much as possible for building, maintaining and using a large macro model, and also for producing tables and figures/graphs. Unfortunately, after EViews12, we experience problems with graphing and have to use EViews12 to get dashed lines that look good when saved to disk (as pdf files) (se previous entries in this tread). When I try to replace dashed lines (for forecasts) with solid lines with the same color/hue but lighter tint (than the historical series), both get the same color. If I try to give them different colors, they still get the same color:

if !eviews_versjon = 12 then 'EViews12
{%gr}.setelem(1) linecolor(@rgb({%color1})) linepattern(solid) legend(%serie1) axis(l) linewidth(!valuta_linewidth )
{%gr}.setelem(2) linecolor(@rgb({%color1})) linepattern(DASH1) legend() axis(l) linewidth(!linewidth)
{%gr}.setelem(3) linecolor(@rgb({%color2})) linepattern(solid) legend(%serie2) axis(r) linewidth(!valuta_linewidth )
{%gr}.setelem(4) linecolor(@rgb({%color2})) linepattern(DASH1) legend() axis(r) linewidth({!linewidth})
{%gr}.setelem(5) linecolor(@rgb({%color3})) linepattern(solid) legend(%serie3) axis(r) linewidth(!valuta_linewidth)
{%gr}.setelem(6) linecolor(@rgb({%color3})) linepattern(DASH1) legend() axis(r) linewidth(!linewidth)
else 'EViews14
{%gr}.setelem(1) linecolor(@rgb({%color1})) linepattern(solid) legend(%serie1) axis(l) linewidth(!valuta_linewidth )
{%gr}.setelem(2) linecolor(@rgb({%color2})) linepattern(solid) legend() axis(l) linewidth(!linewidth)
{%gr}.setelem(3) linecolor(@rgb({%color3})) linepattern(solid) legend(%serie2) axis(r) linewidth(!valuta_linewidth )
{%gr}.setelem(4) linecolor(@rgb({%color1})) linepattern(solid) legend() axis(r) linewidth({!linewidth})
{%gr}.setelem(5) linecolor(@rgb({%color2})) linepattern(solid) legend(%serie3) axis(r) linewidth(!valuta_linewidth)
{%gr}.setelem(6) linecolor(@rgb({%color3})) linepattern(solid) legend() axis(r) linewidth(!linewidth)
endif

Why can we not format the line type in EViews 13 and 14?

Re: Saving graphs as pdf

Posted: Fri Apr 17, 2026 8:20 am
by EViews Gareth
Do you have a simple example we can examine?

Re: Saving graphs as pdf

Posted: Mon Apr 27, 2026 6:23 am
by Dag Kolsrud
I have attached a small workfile with sereis of different frequencies on different pages and a program that creates three figures and collects them in a spool. The results show that when a forecast seires is graphed from a page with lower frequency, it does not get dashed. In the first figure produced by the program, the following commands (where w denote a page with weekly frequecy) executed from from a page with quarterly frequency produce a figure with solid rather than dashed forecasts:

graph {%gr}.line(x) w\noki44_h w\noki44_f w\nokeur_h w\nokeur_f w\nokusd_h w\nokusd_f '
{%gr}.setelem(1) linecolor(@rgb({%color1})) linepattern(solid) legend(%serie1) axis(l) linewidth(!linewidth)
{%gr}.setelem(2) linecolor(@rgb({%color1})) linepattern({%dashline}) legend() axis(l) linewidth(!linewidth)
{%gr}.setelem(3) linecolor(@rgb({%color2})) linepattern(solid) legend(%serie2) axis(r) linewidth(!linewidth)
{%gr}.setelem(4) linecolor(@rgb({%color2})) linepattern({%dashline}) legend() axis(r) linewidth(!linewidth)
{%gr}.setelem(5) linecolor(@rgb({%color3})) linepattern(solid) legend(%serie3) axis(r) linewidth(!linewidth)
{%gr}.setelem(6) linecolor(@rgb({%color3})) linepattern({%dashline}) legend() axis(r) linewidth(!linewidth)

If graphed from a page with weekly frequency, the forecasts get dashed as instructed. The problem of color was due to some forecast series containing the history. Removing the history form the forecast series solved the problem.