The plots generated by IFEFFIT can be saved to Postscript, GIF, and PNG files, though these may not all be available on all platforms. The creation of hardcopy as described in this section is an ideal job for IFEFFIT macros, as discussed in chapter 10. You'll probably want to play with the 'hardcopy generation' macros once and then use them extensively without looking at them. As with many aspects of PGPLOT, the quality is not the highest (notably, vector fonts are used, even in the PostScript output), but the results are passable enough for many situations.
To save a plot image to a file, you need to supply a file name and the type of output device. Thuse, to save a black-and-white PostScript version of the current plot to the file ifeffit.ps, you would type:
Ifeffit> plot(device="/ps",file= "ifeffit.ps")The plot device is automatically reset to the default interactive window after saving the file. Other devices listed in Table 8 will produce different forms of output.
It must be noted that the images generated will preserve the background and foreground color, even for black-and-white output. This means that if you're plotting on a screen with a black background and a white foreground (ie, white text), then the output image file will use a lot of ink when you print it out. You almost certainly want to redraw plots with black foreground and white background for printing:
Ifeffit> plot(device="/vps",file= "ifeffit.ps", bg=white,fg=black)
The size of the output postscript file is set (in units of 0.001" = 25 m) with the environmental variables PGPLOT_PS_HEIGHT and PGPLOT_PS_WIDTH:
# bash syntax: set PGPLOT PostScript size PGPLOT_PS_HEIGHT 6000 PGPLOT_PS_WIDTH 4000 export PGPLOT_PS_HEIGHT export PGPLOT_PS_WIDTH
While Postscript files are appropriate for printing and inclusion in papers, GIF and PNG files are more widely used for Web publication. GIF files can be produced with the "/gif" plot device. Landscape mode GIFS are generated with "/vgif". As with the Postscript drivers, the colors generated in the GIF file will be close to those on the screen, including the background and foreground colors. The text strings, on the hand, may be rendered slightly differently than on the screen. The size of the GIF output file can be set in pixels with the environmental variables PGPLOT_GIF_HEIGHT and PGPLOT_GIF_WIDTH:
# cshrc syntax: set PGPLOT PostScript size setenv PGPLOT_GIF_HEIGHT 800 setenv PGPLOT_GIF_WIDTH 1000Due the limited quality of the GIF output, it may be tempting to create very large GIF file and reduce it afterwards. This works reasonably well, though to be honest, I've had better success with doing screen grabs of the PGPLOT window to a native bitmap and converting that to the desired format.
PNG files are similar to GIF, though generally smaller and slightly superior in quality. The PNG files written by PGPLOT are, however, about the same quality as the GIF output. On the bright side, they are not burdened by use of a software patent.