Outputting to a Postscript File

There are two main uses for graphs in Postscript format. The first is to have a copy you can print later, without using GnuPlot. You need regular Postscript files for this. The second is to include the graph in another document. For this option you need to use Encapsulated Postscript Files. This is a special form of Postscript that can be included in documents. (EPS files don't have the extra lines that are used when a PS file is printed directly to a printer). To generate a postscript file, do the following: To print this file from the command line (not in GnuPlot), type If you print to this file again, it will append the graph to the end of the file as a second page. For instance, would create a 2-page postscript file called "file2.ps". The first page would be the plot of z=sin(xy) and the second page would be the plot of y=x2. Usually, you will only want the one graph in each PS file.

When you want to return to printing to the screen, type the following two lines:

Options for set terminal postscript

There are several options for this command:

Printing to EPS files

To print to an EPS file, you do the same as for PS files, but use the following set terminal command. Make sure you only print one image to each EPS file.
Table of Contents - Previous - Printing to Printer - Next - Outputting to a Graphics File
College of Natural Sciences / University of Northern Iowa / manager@cns.uni.edu

Copyright © 1996 College of Natural Sciences. All Rights Reserved.
Last Modified: 10/29/96