zi
initialize graphics filter
SYNOPSIS
zi filter [file|@spool_opts] [filter_opts]
DESCRIPTION
Initializing the graphics filter starts a process to interpret the z commands for particular graphics devices. Two filters may be active at a time. Use the commands zf,``zf1`` and zf2 to switch between filters.
When you type zi with no parameters, the filters available in the directory "$CPLOTHOME/filters" are listed, with the name of the last-used filter, or if there is none, the default filter, displayed in parenthesis. You may enter <return> to use that filter, or you may enter the name of the desired filter program and options and then <return>
Giving the file or device name file as the first argument after filter switches the standard output of the filter to file. (Note that file can't begin with a \- 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 epsfilter plot.eps
sends the output of epsfilter to the file plot.eps.
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,or 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, as if you had typed zi.
Before a new filter process is begun, the program waits for the previous filter process (if any) to terminate. If you enter zi and the plot program 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 process also is killed when C-PLOT exits, as C-PLOT 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 just hit <return> and then exit the plot program. Alternatively, use the zs command 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. See help files for particular filters, such as psfilter , hpjet or hpgl2 , for more information.
If filter contains a / character, 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.
For general information on graphics filters, see the filters help file.