[Thread Prev][Thread Next][Index]

Re: batch PostScript

Hi Andrew,

The margins around the edge come from two sources

  1. the placement of the "active plotting rectangle" within the plotting
     window (in Ferret)
  2. the placement of the plot on the printed page (in PostScript)

For 1 there is a script
    yes? GO margins

For 2 the correct solution is to generate a metafile and use the -g option on
gksm2ps to custom-place it on the page (see gksm2ps -help below).  As you
point out there was a bug in the PostScript translations of V5.40.  That has
been fixed in V5.41, which will be out in just 2-3 weeks.


> gksm2ps -help
gksm2ps: Send PostScript translation of GKSM metafiles to a file
  usage: gksm2ps [-h] [-p landscape||portrait] [-l ps||cps] [-d cps||phaser]
         [-X || -o <ps_output_file>] [-R] [-a] [-g WxH+X+Y] [-v] file(s)

     -h: print this help message
     -p: page orientation, landscape or portrait (default fits to page)
     -l: line styles,  ps == monochrome (default), cps == color
     -d: device type, cps == Postscript (default), phaser == TEK phaser PS
     -X: Send output to your Xwindow for preview instead of a file
     -o: PS output file name (default name is 'gksm2ps_output.ps')
     -R: do not rename files with a date stamp appended (default is to stamp)

     -a: make hard copy the size of the original plot (default fits to page)
     -g: WxH+X+Y  WIDTH, HEIGHT, XOFFSET, & YOFFSET in points (72 pts = 1 in)

     -v: list version number of gksm2ps and do nothing else
file(s): The specific metafile(s) to be translated.


    - steve

Andrew Wittenberg wrote:

> Dear Ferret users,
> Some questions on creating PostScript output in batch mode.  I'm running
> Ferret v5.40 under RH Linux v7.1.  Consider a simple shell script that
> creates a map of the world:
> cat << EOF | ferret -batch plot.ps >& /dev/null
> go magnify
> go basemap
> quit
> 1) This gives large margins around all the edges of the PostScript file,
> even though I used "go magnify".  How can I eliminate or reduce these
> margins? They don't appear when I produce a similar plot in the normal
> (non-batch) Ferret environment.
> 2) If try another route and eliminate "plot.ps" from the script above, so
> the output goes to metafile.plt, then Fprint doesn't work on that
> metafile.  I get a series of error messages: "GKSM item 3 is undefined",
> and the output PostScript file is blank.
> Thanks for any help,
> Andrew
> ----------------------------------------------------------------------
> Andrew Wittenberg          Program in Atmospheric and Oceanic Sciences
> andyw@splash.princeton.edu                        Princeton University
> ----------------------------------------------------------------------

Steve Hankin
NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080 -- FAX (206) 526-6744

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement