PLOT(1) | GNU Plotting Utilities | PLOT(1) |
plot - translate GNU metafiles to other graphics formats
plot [ options ] [ files ]
plot translates files in GNU metafile format to other graphics formats, or displays them on an X Window System display. GNU metafile format is a device-independent format for the storage of graphic data. It is the default output format of the programs graph(1), pic2plot(1), tek2plot(1), and plotfont(1), and is further documented in plot(5), since it is an enhanced version of the traditional plot(5) format found on non-GNU systems. It can also be produced by the GNU libplot 2-D graphics export library (see plot(3)).
The output format is specified with the -T option. The possible output formats and display types are the same as those supported by graph(1), plotfont(1), pic2plot(1), and tek2plot(1). If an output file is produced, it is written to standard output.
Options and file names may be interspersed on the command line, but the options are processed before the file names are read. If -- is seen, it is interpreted as the end of the options. If no file names are specified, or the file name - is encountered, the standard input is read.
The following options set the initial values of drawing parameters. However, all of these may be overridden by directives in a metafile. In fact, these options are useful primarily when plotting old metafiles in the traditional (pre-GNU) plot(5) format, which did not support such directives.
The following option is relevant only if the -T option is omitted or if -T meta is used. In this case the output of plot, like the input, will be in GNU graphics metafile format.
By default, plot assumes that its input file(s) are in either the binary version or the portable version of GNU metafile format. You may specify that the input is, instead, in the traditional Unix (pre-GNU) graphics metafile format, which is documented in plot(5). The traditional graphics metafile format was produced by pre-GNU versions of graph(1).
The environment variables BITMAPSIZE, PAGESIZE, BG_COLOR, EMULATE_COLOR, MAX_LINE_LENGTH and ROTATION serve as backups for the options --bitmap-size, --page-size, --bg-color, --emulate-color, --max-line-length, and --rotation, respectively. The remaining environment variables are specific to individual output formats.
plot -T X, which pops up a window on an X Window System display and draws graphics in it, checks the DISPLAY environment variable. Its value determines the display that will be used.
plot -T png and plot -T gif, which produce output in PNG format and pseudo-GIF format respectively, are affected by the INTERLACE environment variable. If its value is "yes", the output will be interlaced. Also, if the TRANSPARENT_COLOR environment variable is set to the name of a color, that color will be treated as transparent in the output.
plot -T pnm, which produces output in portable anymap (PBM/PGM/PPM) format, is affected by the PNM_PORTABLE environment variable. If its value is "yes", the output will be in a human-readable format rather than binary (the default).
plot -T cgm, which produces output in CGM (Computer Graphics Metafile) format, is affected by the CGM_MAX_VERSION and CGM_ENCODING environment variables. By default, it produces a binary-encoded version of CGM version 3 format. For backward compatibility, the version number may be reduced by setting CGM_MAX_VERSION to "2" or "1". Irrespective of version, the output CGM file will use the human-readable clear text encoding if CGM_ENCODING is set to "clear_text". However, only binary-encoded CGM files conform to the WebCGM profile.
plot -T pcl, which produces PCL 5 output for Hewlett-Packard printers and plotters, is affected by the environment variable PCL_ASSIGN_COLORS. It should be set to "yes" when producing PCL 5 output for a color printer or other color device. This will ensure accurate color reproduction by giving the output device complete freedom in assigning colors, internally, to its "logical pens". If it is "no" then the device will use a fixed set of colored pens, and will emulate other colors by shading. The default is "no" because monochrome PCL 5 devices, which are much more common than colored ones, must use shading to emulate color.
plot -T hpgl, which produces Hewlett-Packard Graphics Language output, is affected by several environment variables. The most important is HPGL_VERSION, which may be set to "1", "1.5", or "2" (the default). "1" means that the output should be generic HP-GL, "1.5" means that the output should be suitable for the HP7550A graphics plotter and the HP758x, HP7595A and HP7596A drafting plotters (HP-GL with some HP-GL/2 extensions), and "2" means that the output should be modern HP-GL/2. If the version is "1" or "1.5" then the only available fonts will be vector fonts, and all lines will be drawn with a default width (the -W option will not work). Additionally, if the version is "1" then the filling of arbitrary curves with solid color will not be supported (circles and rectangles aligned with the coordinate axes may be filled, though).
The position of the plot -T hpgl graphics display on the page can be rotated 90 degrees counterclockwise by setting the HPGL_ROTATE environment variable to "yes". This is not the same as the rotation obtained with the --rotation option, since it both rotates the graphics display and repositions its lower left corner toward another corner of the page. Besides "no" and "yes", recognized values for HPGL_ROTATE are "0", "90", "180", and "270". "no" and "yes" are equivalent to "0" and "90", respectively. "180" and "270" are supported only if HPGL_VERSION is "2" (the default).
By default, plot -T hpgl will draw with a fixed set of pens. Which pens are present may be specified by setting the HPGL_PENS environment variable. If HPGL_VERSION is "1", the default value of HPGL_PENS is "1=black"; if HPGL_VERSION is "1.5" or "2", the default value of HPGL_PENS is "1=black:2=red:3=green:4=yellow:5=blue:6=magenta:7=cyan". The format should be self-explanatory. By setting HPGL_PENS you may specify a color for any pen in the range #1...#31. All color names recognized by the X Window System may be used. Pen #1 must always be present, though it need not be black. Any other pen in the range #1...#31 may be omitted.
If HPGL_VERSION is "2" then plot -T hpgl will also be affected by the environment variable HPGL_ASSIGN_COLORS. If its value is "yes", then plot -T hpgl will not be restricted to the palette specified in HPGL_PENS: it will assign colors to "logical pens" in the range #1...#31, as needed. The default value is "no" because other than color LaserJet printers and DesignJet plotters, not many HP-GL/2 devices allow the assignment of colors to logical pens.
Opaque filling and the drawing of visible white lines are supported only if HPGL_VERSION is "2" and the environment variable HPGL_OPAQUE_MODE is "yes" (the default). If its value is "no" then white lines (if any), which are normally drawn with pen #0, will not be drawn. This feature is to accommodate older HP-GL/2 devices. HP-GL/2 pen plotters, for example, do not support opacity or the use of pen #0 to draw visible white lines. Some older HP-GL/2 devices may, in fact, malfunction if asked to draw opaque objects.
plot -T tek, which produces output for a Tektronix terminal or emulator, checks the TERM environment variable. If the value of TERM is a string beginning with "xterm", "nxterm", or "kterm", it is taken as a sign that plot is running in an X Window System VT100 terminal emulator: a copy of xterm(1), nxterm(1), or kterm(1). Before drawing graphics, plot -T tek will emit an escape sequence that causes the terminal emulator's auxiliary Tektronix window, which is normally hidden, to pop up. After the graphics are drawn, an escape sequence that returns control to the original VT100 window will be emitted. The Tektronix window will remain on the screen.
If the value of TERM is a string beginning with "kermit", "ansi.sys", or "nansi.sys", it is taken as a sign that plot is running in the VT100 terminal emulator provided by the MS-DOS version of kermit(1). Before drawing graphics, plot -T tek will emit an escape sequence that switches the terminal emulator to Tektronix mode. Also, some of the Tektronix control codes emitted by plot -T tek will be kermit-specific. There will be a limited amount of color support, which is not normally the case (the 16 `ansi.sys' colors will be supported). After drawing graphics, plot -T tek will emit an escape sequence that returns the emulator to VT100 mode. The key sequence `ALT minus' can be employed manually within kermit to switch between the two modes.
graph(1), pic2plot(1), tek2plot(1), plotfont(1), plot(3), plot(5), and "The GNU Plotting Utilities Manual".
plot was written by Robert S. Maier (rsm@math.arizona.edu).
Email bug reports to bug-gnu-utils@gnu.org.
Jun 2000 | FSF |