PPM (Portable Pixel Map)

The PPM raster format was defined by Jef Poskanzer, whose Portable Bitmap Utilities (available on the Internet) can be used to translate it into a variety of other formats. The program xv (by John Bradley, bradley@cis.upenn.edu) can be used to display PPM files on UNIX and VMS workstations. PGPLOT uses the P6 variant, with 24 bits (8 each for R, G, B) for each pixel. The format is not efficient in use of storage, so for most purposes the GIF format is preferred.
Device type code
/PPM (landscape orientation), /VPPM (portrait orientation).
Default file name
pgplot.ppm
A PPM file can contain only a single image, so for multi-page plots PGPLOT creates additional files. If the supplied file name contains the character #, the file name is derived by replacing this character with the current page number. If the supplied file name does not contain a #, PGPLOT appends an underscore and the page number for the second and subsequent pages, e.g.,
   PGBEG file name:	File names used:
    pgplot#.ppm          pgplot1.ppm, pgplot2.ppm, pgplot3.ppm, ...
    pgplot.ppm           pgplot.ppm, pgplot.ppm_2, pgplot.ppm_3, ...
If the supplied file name is ``-'', the output is sent to the standard output stream, so that it can, for example, be piped into a viewing program. This will only work for single-page plots.
Default view surface dimensions
/PPM: 850 by 680 pixels (nominally 10.0 by 8.0 inches)
/VPPM: 680 by 850 pixels (nominally 8.0 by 10.0 inches)
These defaults can be overridden by specifying environment variables, or by calling routine PGPAP. The maximum size is limited only by available memory.
Resolution
PGPLOT assumes that the device resolution is 85 pixels/inch, but the actual resolution will vary depending on the display device.
Color capability
Color indices 0--255 are accepted, with standard defaults for color indices 0--15. If the color representation of a color index is changed, it affects only pixels drawn subsequently, so the number of different colors that can be used in an image is not limited to 256.
Input capability
None.
Environment variables
PGPLOT_PPM_WIDTH : width of image in pixels (default 850)
PGPLOT_PPM_HEIGHT : height of image in pixels (default 680)
File format
PPM files are binary files.
Author
Remko Scharroo, Tim Pearson, 1994.