Introduction
HP-GL, the Hewlett-Packard Graphics Language, is the command language of HP’s pen
plotters. A plot file holds the commands that move a pen across the paper, so it
describes a drawing as lines rather than pixels. CAD programs still write HP-GL and its
successor HP-GL/2 for large-format plotters and printers, and for vinyl and laser
cutters, usually with the extension .plt, .hpgl or
.hgl.
The extension .plt is also used by other programs, for example for
AutoCAD plot files and gnuplot scripts.
Structure
An HP-GL file is plain text. Each command is two letters followed by optional
numbers separated by commas, and ended by a semicolon. IN initialises the
plotter, SP selects a pen, PU and PD lift and
lower the pen while moving to the points given, and PA sets absolute
coordinates. Coordinates are in plotter units of 0.025 mm, 40 to the millimetre.
IN;SP1;
PU0,0;PD4000,0,4000,4000,0,4000,0,0;
PU;SP0;