How to import GrADS generated eps file into LaTeX



The ps file generated from GrADS has .eps extension, and has no way to be imported
directly into LaTeX. If one insists doing so, he's unable to scale, rotate, and clip (by
changing BoundingBox info) the graphic. Even ps2epsi command cannot make the
situation any better. Moreover, by using convert command, the graphic file is OK to be
imported in LaTeX, but its quality is greatly deteriorated (lost resolution). However, the
following simple two steps can solve the problem, and the converted graphics remains
the same quality as the original.

Step 1 - convert ps (.eps from GrADS) to pdf format:

    ps2pdf myfile.eps myfile.pdf
This myfile.pdf can be viewed by acroread and editted and printed from within the reader.
But the following step can directly convert .pdf into .ps without opening acroread window.

Step 2 - convert pdf to regular ps file:

    acroread -toPostScript myfile.pdf
A ps file named myfile.ps is generated, which contains necessary BoundingBox Info, so
can be directly used by LaTeX (scalable, clippable & rotatable).

Note: DO NOT use pdf2ps to make the conversion in step 2.


To simplify, a script grads2ps has been written on Linux (lobster), which implements the
above two steps together (assuming file from GrADS: myfile.eps):

    grads2ps myfile
will directly result in myfile.ps