next up previous contents index
Next: C.2 Converting GMT PostScript Up: C. Including GMT graphics Previous: C. Including GMT graphics   Contents   Index


C.1 Making GMT Encapsulated PostScript Files

GMT can produce both freeform PostScript files and the more restricted Encapsulated PostScript files (EPS). The former is intended to be sent to a printer or PostScript previewer, while the latter is intended to be included in another document (but should also be able to print and preview). You control what kind of PostScript that GMT produces by manipulating the PAPER_MEDIA parameter (see the gmtdefaults man page for how this is accomplished). Note that a freeform PostScript file may contain special operators (such as Setpagedevice) that is specific to printers (e.g., selection of paper tray). Some previewers (among them, Sun's pageview) do not understand these valid instructions and may fail to image the file. Also, embedding freeform PostScript with such instructions in it into a larger document can create printing to fail. While you could choose another viewer (we recommend ghostview) to view single plots prepared by GMT, it is generally wiser anyhow to select EPS output when you are creating a plot intended for inclusion into a larger document. Some programs (and some publishers as well) do not allow the use of instructions like Setpagedevice as part of embedded graphics.

An EPS file that is to be placed into another document needs to have correct bounding box parameters. These are found in the PostScript Document Comment %%BoundingBox. Applications that generate EPS files should set these parameters correctly. Because GMT makes the PostScript files on the fly, often with several overlays, it is not possible to do so accurately. However, GMT does make an effort to ensure that the BoundingBox is large enough to contain the entire composite plotC.1. Therefore, if you need a ``tight'' BoundingBox you need to post-process your PostScript file. There are several ways in which this can be accomplished.

If you do not want to modify your illustration but just include it in a text document: many word processors (such as Microsoft Word, Corel WordPerfect, and Apple Pages) will let you include a PostScript file that you may place but not edit. Newer versions of those programs also allow you to include PDF versions of your graphics. Except for Pages, you will not be able to view the figure on-screen, but it will print correctly.


next up previous contents index
Next: C.2 Converting GMT PostScript Up: C. Including GMT graphics Previous: C. Including GMT graphics   Contents   Index
Paul Wessel 2008-05-02