HPGL file

Top  Previous  Next

HPGL, sometimes hyphenated as HP-GL, is the primary printer control language used by Hewlett-Packard plotters.

The name is short for Hewlett-Packard Graphics Language. It later became a standard for almost all plotters.


The language is formed from a series of two letter codes, followed by optional parameters.

For instance an arc can be drawn on a page by sending the string: AA100,100,50;

This means Arc Absolute, and the parameters place the center of the arc at 100,100 on the page,

with a starting angle of 50 degrees measured counter-clockwise.


Typical HPGL files started with a few setup commands, followed by a long string of graphics commands.


An example HPGL file




initialize, start a plotting job


set the initial point (origin), in this case the default 0,0


set the scale so the page is 0 to 100 in both X and Y directions


select pen 1


move pen to starting point for next action


put down the pen and move to the following locations


lift the pen and move to 50,50


draw a circle with radius 25


lift the pen and move to 20,80


The coordinate system is based on the smallest units one of their plotters could support,

and was set to 25 µm (i.e. 40 units per millimeter, 1016 per inch).


Isocam © Uses only vector and movement commands to be compatible with all machines that can handle HPGL.

However in the Isocam Pro © version Arcs and Circles may be used as well.