C-PLOT

Scientific Graphics and Data Analysis

psfilter

PostScript filter

DESCRIPTION

The psfilter C-PLOT graphics filter produces instructions appropriate for printers that support the PostScript language. The filter also can produce encapsulated PostScript appropriate for including in documents that mix text and graphics. The filter is invoked using the following command:

zi psfilter [output_options] [psfilter_options]

The output_options are the standard options available to select an output file or spooler command. See the filters help file for more information. The psfilter_options are specific to this filter and are described below. The output_options must appear first.

-color or -colors
Indicates output is destined for a color printer or display. See the colors help file for information on color assignments. See below for the monochrome pen number assignments.
-screen screen_size
Sets the screen size for shaded areas. The units of screen_size are dots per inch. The LaserWriter default is 60 dpi. The psfilter default is 120 dpi. A value less than or equal to zero will prevent the setscreen command from being included in the generated PostScript.
-v3
Will generate headers and trailers for version 3 PostScript document structuring conventions. The default is for version 2.
-eps
Indicates the output is to conform to the PostScript encapsulating conventions, allowing the output to be included within other documents. A bounding-box comment will be generated that describes the marked area of the plot. The ze command to erase the entire page has no effect in order to limit the bounding box to the marked area. See -full below. The default orientation of the bounding box is in portrait mode. See -rotate below.
-full
When used with the -eps flag for encapsulated PostScript, generates a bounding box comment that describes the full 8.5 by 11 inch page. Otherwise, the bounding box comment describes only the area of the page that has markings.
-rotate
If used with the -eps flag for encapsulated PostScript, changes the orientation from the default portrait mode to landscape mode. For regular PostScript, changes the orientation from the default landscape mode to portrait mode. In the latter case, the aspect ratio of the plot will be distorted. To produce portrait-mode, undistorted, unencapsulated PostScript plots, use the tu command within C-PLOT.
-multipage or -multi
Without this flag, if more than one page of plots is called for, psfilter will by default structure the output as a single multipage document, which allows PostScript viewers, such as ghostview, to be used to view the output. The -multipage option restores the behavior of versions of psfilter released prior to January 16, 1996, where the PostScript output file contained a series of single-page document descriptions, one for each page of the plot.
-ps2

Used to generate PostScript appropriate for including in ditroff documents that are filtered through the Adobe psdit program that is part of the transcript package. A suitable ditroff macro for including the plots is::

.de CF
.br
.if \n(.$>1 .ne \$2+1v
.sp -.5v
.mk
\h'0'\c
.if !'\$1'' .if \n(.P .cf ./\$1
.rt
.if \n(.$>1 .sp \$2
.sp 1v
..

If invoked as:

``.CF some_file.ps2 3i``

the macro will leave 3 inches for the plot. Without an argument, no spacing is done.

The origin of the C-PLOT coordinates will be the current point as left by ditroff.

Before making the plot, use the commands:

tu 1            # rotate plot
sc 20.5 27.3    # Postscript plotting area
                #  is 20.5cm x 27.3cm
                #  on Apple LaserWriter II
                #  (see the "sc" command)

Also, you can use the -offset options to wi to position the plot at the top of the coordinate system, as in,

wi 4 -1 10 5

which puts the top of the plot window 1cm below the top of the page.

USING ze AND zE WITH ENCAPSULATED POSTSCRIPT

When invoked with the -eps flag (and not the -full flag), psfilter interprets C-PLOT's erase commands a bit differently. Without -full,the encapsulated-PostScript bounding box is set to encompass only the marked areas of the page. In order to prevent parts of the encapsulating document that are outside the bounding box from being erased, the ze erase command is ignored when issued before anything is drawn on the page. If ze is issued after something is drawn on the page, only the rectangular region defined by the current bounding box is filled with the background color. If you use the zE command to color or erase a region smaller than the entire page, that area is considered marked, and the bounding box is set to encompass that region. If you want to color the entire paper window with the background color, invoke psfilter with the -full flag.

MONOCHROME PEN NUMBERS

For black and white plotting, the pen numbers are assigned as follows, where the scale is such that gray0 is black and gray100 is white.

0 background (white)
1 foreground (initially black)
2 gray90
3 gray60
4 gray75
5 gray50
6 gray80
7 gray30
8 gray100
9 gray0
10 gray35
11 gray45
12 gray55
13 gray65
14 gray75
15 gray85
16 gray95