[Thread Prev][Thread Next][Index]

Re: converting metafile to EPS



Hi Hein,

At least on our systems (RH Linux 7.3 and IRIX 6.5), the Ferret PostScript
output is almost valid EPS, it just needs a couple of small changes to the
PostScript file.  It might be simple for the developers to add these
commands at the end of the Fprint script.

(By valid EPS, I mean that the resulting file works in LaTeX.)

For portrait-oriented graphics, I do the following to create an EPS file:

Fprint -o out.ps -p portrait -R metafile.plt
awk '{print ($1=="%\!PS-Adobe-1.0" ? "%\!PS-Adobe-2.0 EPSF-1.2" : $0)}' <out.ps >out.eps


For landscape-oriented graphics, I do:

Fprint -o out.ps -p landscape -R metafile.plt
cat out.ps | sed \
  -e 's/^%\!PS-Adobe-1.0$/%\!PS-Adobe-2.0 EPSF-1.2/' \
  -e 's/\(%%BoundingBox: *\)\([0-9][0-9]*\)  *\([0-9][0-9]*\)  *\([0-9][0-9]*\)  *\([0-9][0-9]*\)/\1\3 \2 \5 \4\\
%%Orientation: Landscape\\
612 792 translate\\
180 rotate/' \
  > out.eps

Andrew


On Wed, 13 Apr 2005, Hein Zelle wrote:

> Dear Ferret users,
> 
> does anyone know of a working method to convert a ferret metafile to
> an EPS file with a properly cropped boundingbox? I generate the
> postscript file with "Fprint -l cps -o postscript.ps metafile.plt". In
> the past I have succesfully used
> 
> - psfixbb 
> - convert postscript.ps postscript.eps
> - ps2epsi postscript.ps postscript.epsi
> 
> I am now using ferret 5.8. On this system (debian unstable) I don't
> have psfixbb. Convert crops the figure around the axis (axis labels,
> title and colorbar labels fall off). ps2epsi puts the figure on a full
> a4 page instead of cropping it.
> 
> Does anyone know of a tool that succesfully crops postscript files
> generated by ferret 5.8 and Fprint (gksm2ps) and makes a proper EPS
> file? I'll happily write a script to modify the postscript file too,
> but I don't know what to modify.
> 
> Thanks
> 	Hein Zelle



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement