Hewlett-Packard (HP or HPGL)
- Last UpdatedNov 24, 2025
- 4 minute read
Models
PLOT incorporates two Hewlett-Packard drivers, HP and HPGL, both of which support all Hewlett-Packard pen plotters and the standard HP-GL file format. The reference device supported by these drivers is the HP7580B plotter, but they also support the HP7586 plotter, with or without a roll feed option, the HP7550 plotter, which has an automatic sheet feed, the IBM 6184 and 6186 plotters, and many other plotters which use HP-GL code. The drivers also support the HP7475 plotter, which has more restricted line style capabilities than the HP7580.
Description
The difference between the two drivers lies in the type of HP-GL code which each uses:
-
The HP driver uses only vectors and absolute positioning, and uses straight-line chords to simulate arcs and circles. Each draw and move operation is output on a separate line of the file. This makes this form of the code easier to interpret.
-
The HPGL driver uses vectors and relative positioning, and uses true arcs and circles. Draw and move commands are merged together, and as many commands as possible are put into each line of the file. These features make this the more compact code of the two
The drivers derive the plotter model number by interrogating the device, so that they allow for use with the HP7475 with its limited functionality. They similarly determine the paper handling capabilities if used with an HP7586 plotter, to allow it to be used with cut-sheet as well as roll-fed paper. They make special provision for producing long plots on roll feed versions of the latter plotter.
Output
The output from this driver is device code which is sent directly to the HP plotter.
These drivers do not mix the two types of HP-GL command, namely graphical commands and communication commands, within a line of output.
Files output by this driver are ASCII coded and record structured. They can be used as input to other conversion programs to produce device code for otherwise unsupported devices.
Options
Several options are available which allow you to control the output from these drivers. You can specify these options either directly, as PLOT command line arguments (see Running PLOT), or indirectly, as parameters in a soft driver definition (see Creating your Own Device Drivers).
The syntax for using each option is as follows (individual options must be separated by commas):
|
[Key: |
val = a real number; Y/N = Yes or No; x y = x,y coordinates in mm] |
|---|---|
|
CEntre Y/N |
Specifies if the physical coordinate origin for the plotter is at the centre (Yes) or corner (No) of the paper after the default positions of the scaling points P1 and P2 have been established. Plotters that use HPGL can be of either of these types. The driver itself corrects for the type in the output file, by use of the HPGL IP (Set P1 and P2) and SC (Scale) instructions. Default: CE N for both HP and HPGL |
|
High |
If selected, this allows the use of high-level commands and compacted output code. If not selected, only low-level commands and one command per line formatting are used. Default:HI not selected for the HP driver HI selected for the HPGL driver |
|
MAp |
Derives the size of the plot from the plot file. |
|
MAp x y |
Defines the position of the plot on the paper (x and y coordinates of its origin expressed in mm). It derives the size of the plot from the plot file. |
|
MAp x y val1 val2 |
Defines the position of the plot on the paper (x and y coordinates of its origin expressed in mm). It defines the plot dimensions as val1 wide by val2 high. Default: MA for both the HP and HPGL drivers |
|
STeps val |
Sets the number of plotter steps per mm (that means, the plotter resolution) to val. Default: ST 40.0 |
|
WAit Y/N/P |
Specifies actions to take place between plots. Y selects that the plotter is switched off-line and waits for the operator. P selects that the plotter completes the present plot and then advances to start the next. N selects no special action. Default: WA Y |
The defaults specified in the standard HP driver are equivalent to the following options string:
"CE N,MA 0 0 1109.5 787.0,ST 40,WA Y"
The defaults specified in the standard HPGL driver are equivalent to the following options string:
"CE N,HI,MA,ST 40,WA Y"
Note: All of the options are applicable when the plot output is sent to a file, but only the HIGH and WAIT options apply when the plot is sent directly to a plotter.
Example
|
plot hp view.pl plot1.plt |
|
|
(output to a file) |
|
|
plot hp view.pl -1 |
|
|
(output direct to plotter) |
|
|
plot hpgl view.pl plot1.plt |
|
|
(output to a file) |
|
|
plot hpgl view.pl -1 |
|
|
(output direct to plotter) |
|
|
plot hp view.pl plot1.plt "CE Y,MA" |
|