The Plotutils Package - plot Environment

Go to the first, previous, next, last section, table of contents.

## Environment variables

The behavior of `plot` is affected by several environment variables. We have already mentioned the environment variables `BITMAPSIZE`, `PAGESIZE`, `BG_COLOR`, and `MAX_LINE_LENGTH`. They serve as backups for the options ``--bitmap-size'`, ``--page-size'`, ``--bg-color'`, and ``--max-line-length'`. 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. The value of this variable determines the display on which the window will be popped up.

`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 file will be in the portable (human readable) version of PBM, PGM, or PPM format, rather than the default (binary) version.

`plot -T gif`, which produces output in pseudo-GIF format, is affected by two environment variables. If the value of the `INTERLACE` variable is "yes", the pseudo-GIF output file will be in interlaced format. Also, if the value of the `TRANSPARENT_COLOR` environment variable is the name of a color that appears in the output file, that color will be treated as transparent by most applications that read GIF files. For information on what color names are recognized, see section Specifying Colors by Name.

`plot -T pcl`, which produces PCL 5 output for Hewlett--Packard printers and plotters, is affected by several environment variables. The position of the graphics display on the page can be adjusted by setting the `PCL_XOFFSET` and `PCL_YOFFSET` environment variables, which may be specified in centimeters, millimeters, or inches. For example, an offset could be specified as "2cm" or "1.2in". Also, the display can be rotated 90 degrees counterclockwise on the page by setting the `PCL_ROTATE` environment variable to "yes". Besides "no" and "yes", recognized values for this variable are "0", "90", "180", and "270". "no" and "yes" are equivalent to "0" and "90", respectively.

The variable `PCL_ASSIGN_COLORS` is also recognized. 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 also 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 thickness (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 adjusted by setting the `HPGL_XOFFSET` and `HPGL_YOFFSET` environment variables, which may be specified in centimeters, millimeters, or inches. For example, an offset could be specified as "2cm" or "1.2in". Also, the display can be rotated 90 degrees counterclockwise on the page by setting the `HPGL_ROTATE` environment variable to "yes". Besides "no" and "yes", recognized values for this variable 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).

Opaque filling and the drawing of visible white lines are supported only if `HPGL_VERSION` is "2" (the default) and the environment variable `HPGL_OPAQUE_MODE` is "yes" (the default). If the value is "no" then opaque filling will not be used, and 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 reportedly malfunction if asked to draw opaque objects.

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. For information on what color names are recognized, see section Specifying Colors by Name. 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 the value of this variable 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.

`plot -T tek`, which produces output for a Tektronix terminal or emulator, checks the `TERM` environment variable. If the value of `TERM` is "xterm", "xterms", or "kterm", it is taken as a sign that the current application is running in an X Window System VT100 terminal emulator: an `xterm`. 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 "kermit", "ansi.sys", "ansissys", "ansi.sysk", or "ansisysk", it is taken as a sign that the current application is running in the VT100 terminal emulator provided by the MS-DOS version of `kermit`. 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.

Go to the first, previous, next, last section, table of contents.