Plotter control sequences
Below, you will find an overview of the HPGL commands that I know of. I used the manual of the PrintGL command to retrieve these. The list is reasonably complete, but if you know of more commands, don't hesitate to inform me (use the 'contact' from the navigator frame).
| AA x,y,arc [,chord_angle] | Arc absolute | AA moves the pen through an arc, starting at the current position, with the pen in the current up/down state. |
| AP | Automatic pen pickup | |
| AR dx_center,dy_center,arc_angle [,chord_angle] | Arc relative | AR moves the pen through an arc, starting at the current position, with the pen in the current up/down state. |
| AS | Acceleration select | |
| CA char-set | Designate alternate character set | See HP-GL Character Sets for a list of character sets. |
| CI radius [,chord_angle] | Circle | CI draws a circle centered at the current position. The current up/down state and position are unchanged by a CI command. |
| CP [spaces ,lines] | Character plot | CP moves the pen by character spaces (+ is along the text) and lines (+ is up), using the current up/down state. Using no parameters is the same as a carriage return/line feed. |
| CS character_set | Designate standard character set | See HP-GL Character Sets for a list of character sets. |
| DF | Default values | This sets default values for the following commands: CA, CS, DR, DT, ES, FT, IW, LO, LT, PA, PT, SC, SM, SL, SR, SS, TL. |
| DI [run , rise] | Absolute character direction | DI sets the baseline direction for labels. The default is 1,0. |
| DR [run ,rise] | Relative character direction | DR sets the baseline direction for labels. Run and rise are a percentage of P2X-P1X and P2Y-P1Y. The default is 1,0. |
| DTt | Define label terminator | The label terminator ends an LB command. The default is ASCII 003. |
| EA x_opp_cornr ,y_opp_cornr | Edge rectangle absolute | EA draws a rectangle defined by the current position and the parameters. The pen position and up/down state are unchanged. |
| EP | Edge polygon | EP draws the current polygon edge. Any pen up/down used in creating the polygon is respected in drawing the edge. |
| ER dx_opp_cornr,dy_opp_cornr | Edge rectangle relative | ER draws a rectangle with corners defined by the current position and the command parameters. The current pen position and up/down state are unchanged. |
| ES [ space [,line]] | Extra space | ES adds to the space between characters and lines. The units are in character cells (1.5*width, 2*height). The allowed range is -1 to 1. -.3333 causes characters to touch. |
| EW radius,start_angle,sweep_angle [,chord_angle] | Edge wedge | EW draws a wedge centered at the current position. The current pen position and up/down state are unchanged. |
| FP | Fill polygon | FP fills the current polygon. Pen up/down commands used in creating the polygon are ignored. There is a limit of 2000 fill line segments per polygon. |
| FT [type [,spacing [,angle]]] | Fill type |
These are the fill types.
|
| IN | Initialize | |
| IP [p1x,p1y [,p2x,p2y]] | Sets scaling points P1 and P2 | IP sets the scaling points (P1 and P2) in plotter units. P1 and P2 are used by several commands to help with size independent plots. |
| IW [x_lower_left, y_lower_left, x_upper_right, y_upper_right] | Input window | IW sets a clipping window in plotter units. With no parameters, the clipping window is turned off. |
| LB..text..terminator | Label | Labels use the current character set, based on CA, CS, SA, and SS commands. See HP-GL Character Sets for font specifics. |
| LO [ position_number ] | Label origin |
LO sets the label origins, shown below. For positions 4..9 and 14..19 the label buffer is limited to 150
characters. The default is 1.
13 16 19
3...... ....... ...6... ....... ......9
. . . . . . . . . .
12 2 . . . . 5 . . . . 8 18
. . . . . . . . . .
1...... ....... ...4... ....... ......7
11 14 17
|
| LT [pattern_number [,pattern_length]] | Line type |
Pattern length is a percentage of the P1-P2 diagonal with a default of 4% and a minimum of 4 dots for types
1 and 2 and 16 dots for other types. Negative (adaptive) line types from the HP 7550 are supported.
no parameter solid 1 . .
2 ________ ________
0 dots at 3 ____________ ____________
endpoints 4 ____________ . ____________ .
only 5 __________ __ __________ __
6 ______ __ __ ______ __ __
7 __________ . . __________ . .
8 ______ . __ . ______ . __ .
|
| PA [x ,y] [,x ,y] ... | Plot absolute | PA sets absolute mode and optionally moves the pen in the current up/down state. |
| PD [x ,y] [,x ,y] ... | Pen down | PD sets the pen down and optionally moves it with the current absolute/relative mode. |
| PG [i] | New page | PG starts a new plot. The parameter is ignored. |
| PM i | Polygon mode |
The following commands are accepted in polygon mode: PM, PA, PR, PU, PD, AA, AR, CI (circles are automatically prefixed and suffixed by PM 1), and IN. The polygon buffer is limited to 1000 data points. |
| PR [dx, dy] [,dx,dy] ... | Plot relative | PR sets relative mode and optionally moves the pen in the current up/down state. |
| PT [thickness] | Pen thickness | PT specifies twice the line spacing used in solid fills and may be from 0 to 5.0 mm. It is reset to .3 mm with each SP command. |
| PU [x,y] [,x,y] ... | Pen up | PU raises the pen and optionally moves it with the current absolute/relative mode. |
| RA x_opp_cornr,y_opp_cornr | Shade rectangle absolute | RA fills a rectangle with corners defined by the current position and the command parameters. The current pen position and up/down state are unchanged. The rectangle edge is not drawn. |
| RO [angle] | Rotate coordinate system |
RO or RO0 sets up a normal coordinate system. RO90, the only other allowed value, sets up a system that is
rotated 90 degrees. The type of rotation depends on the paper size. This command does not change the
scaling points, so an IP command is useful after an RO.
The HP 7475 specifies two different meanings for RO90 depending on the paper size (A/A4 or B/A3).
Small paper rotation: Large paper rotation:
RO 0 RO 90 RO 0 RO 90
y -------- 0,0 -------- y 0,0 -------- y y --------
| | | | | | | |
| | | | | | | |
0,0 -------- x x -------- | | | |
| | | |
| | | |
| | | |
x -------- 0,0 -------- x
|
| RR dx_opp_cornr,dy_opp_cornr | Shade rectangle relative | RR fills a rectangle with corners defined by the current position and the command parameters. The current pen position and up/down state are unchanged. The rectangle edge is not drawn. |
| SA | Select alternate character set | SA specifies the alternate character set as current. The alternate character set is chosen with CA. |
|
SC [xmin ,xmax ,ymin ,ymax] SC xmin,xrto,ymin,yrto,2 |
Scaling | SC sets user units. The units are defined by user values for P1 (xmin,ymin) and P2 (xmax,ymax) or P1 and the ratio of plotter to user units. Using no parameters turns scaling off, and subsequent drawing is done in plotter units (1/1016 inch). |
| SI [width ,height] | Character size absolute | SI sets the capital letter box width and height in centimeters. Letter spacing is 1.5 * width and line spacing is 2 * height. Using no parameters with B or A3 paper is the same as SI.285,.375 and any other paper is the same as SI.187,.269. |
| SL [tan_angle] | Character slant | SL sets the character slant. The parameter is interpreted as the tangent of the angle from vertical. Using no parameter sets the slant to 0 degrees. |
| SM[c] | Symbol mode | SM sets symbol mode, which centers the symbol mode character at any plotted point. Any character from ASCII 033 to 127 except ";" sets symbol mode. Any other character turns symbol mode off. |
| SP pen_number | Select pen | SP selects a pen. Using 0 or no parameter stores the pen without selecting a new pen. This is usually done at the end of a plot. |
| SR [width ,height] | Character size relative | SR sets the capital letter box width and height as a percentage of P2X-P1X and P2Y-P1Y. Letter spacing is 1.5 * width and line spacing is 2 * height. Using no parameters is the same as SR.75,1.5. |
| SS | Select standard character set | SS specifies the standard character set as current. The standard character set is chosen with CS. |
| TL [positive_length [,negative length]] | Tick length | TL sets the tick lengths used by XT and YT. The parameters are lengths above and below the current position as a percentage of P2Y-P1Y for x- axis ticks and a percentage of P2X-P1X for y-axis ticks. |
| UC [[pen_control ,] x_delta ,y_delta] ... | User character | UC specifies a user defined character. The pen control number is 99 for pen down or -99 for pen up. Pen movements are relative, with x_delta in units of 1/4 the character width and y_delta in units of 1/8 the character height. |
| WG radius ,start_angle ,sweep_angle [,chord_angle] | Shade wedge | WG fills a wedge centered at the current position. The current pen position and up/down state are unchanged. The wedge edge is not drawn. |
| XT | X-axis tick | XT draws a vertical line, with length specified by the TL command, at the current position. The pen position and up/down state are unchanged. |
| YT | Y-axis tick | YT draws a horizontal line, with length specified by the TL command, at the current position. The pen position and up/down state are unchanged. |
Page created around 1997 and
Page equipped with FroogleBuster technology