C-PLOT

Scientific Graphics and Data Analysis

9.2. - zi initialize graphics filter



starts a process to interpret the z commands for graphics devices.
zi
or
zi filter [filename | @spool_opts] [filter_opts]
When no parameters are entered with zi, a list of the files in $CPLOTHOME/filters is displayed and you can enter the name of the filter program you want to use. The name of the last-used filter, or if there is none, the default filter, also will be shown. You may enter <return> to use that filter or enter the name of the desired filter.

Giving the file or device name filename as the first argument after filter switches the standard output of the filter to filename. (Note that filename can't begin with - or @ character.) You might use this option to redirect video displays to another terminal or to put output destined for a printer into a file to be sent to the printer at a later time. For example,
zi psfilter plot
sends the output of psfilter to the file plot

Although
filters that have output destined to be printed (or spooled) are usually already configured to send that output to a particular printer, you may override the default spooling commands by using the @spool_opts feature. For example,
zi psfilter @lp @-dlaser @-s
sends the output of psfilter to the lp spooling command lp with the options -dlaser -s. Otherwise, the spooling command is taken from the file $CPLOTHOME/filters/spoolers. If there is none specified there, the compiled-in spooling command, if present, is used. If no spooling command is specified with any of those three methods, the filter output is written to the screen.

If you enter any of the z commands before initializing a filter with zi, you will be prompted for a filter name. Again, entering <return> will invoke the filter displayed, or you may enter a different filter name and then <return>.

Before a new filter process is begun, the program waits for the previous filter process (if any) to terminate. If you enter zi and C-PLOT is waiting for the previous filter process to terminate, typing a ^C will return the program to the PLOT-> prompt. Entering another zi will kill the previous filter process without waiting for it to terminate normally. You may want to terminate a filter to kill a misbehaving filter program or to abort a plot when you don't want to wait for it to be completed.

The filter also is killed when C-PLOT exits; the program is designed to clean up all subprocesses and temporary files it has created. To make sure a filter associated with a printer has finished processing its input, type zi before exiting the program. The program will wait until the current filter has finished and then prompt for a new filter name. You can hit <return> and then exit the plot program. Alternatively, use the zs command (described below) to synchronize filter termination with the plot program.


Some filters, such as those that generate PostScript or HPGL-2 , recognize command line options. For example,
zi psfilter plot.eps -eps -color
places encapsulated color PostScript in the file plot.eps.

The filters reside in $CPLOTHOME/filters. If filter includes a /, the name is taken as an absolute or relative path name. The names of the filters are arbitrary, and each site is free to rename the installed filters.