Creating Graphics

Creating graphics is just like using a pen and paper. Graphics are drawn on the display using an imaginary pen on an electronic tablet. The PD (pen down) command draws on the display as the pen is moved. The PU (pen up) command lifts the pen. Use PU to reposition the pen without drawing. When the pen is lifted, previously drawn graphics are not erased (just as with a pen and paper). Use the LINET command to select the type of line drawn.

Once drawn, objects cannot be moved, erased, or redrawn. However, if you use IT to assign graphics objects to an item (refer to \Drawing Graphics Items" in this chapter), you can move, erase, or redraw them. The pen must be placed down to draw all objects except those de￿ned with the item command, IT, or characters written with the TITLE or TEXT command. You must place the pen down in order to draw lines (PA and PR), grids (GRID), graphics markers (MK), or traces (GRAPH).

The pen is positioned on an X-Y coordinate system di￿erent ways. The PA command (plot absolute) moves the pen to an absolute position on the display. The PR command (plot relative) moves the pen to a position on the display relative to the current pen position. With each command, you specify a series of X-Y coordinates that moves the pen. The number of X-Y coordinates that can follow pen-positioning commands, like PA, is limited only by the memory in the display. Some graphics are drawn more e￿ectively with the PR command, especially when the same object appears in more than one position on the display. Use PA to position the object on the display, then use PR to draw the object.

The following example shows how to draw an identical box using ￿rst the PA command and then the PR command.

100

OUTPUT

723;"PU;PA 0,0;PD;"

Position pen.

120

OUTPUT

723;"PA 300,0,300,200,0,200;";

Draw a rectangle using PA. Semicolon suppresses carriage

 

 

 

 

return and line feed.

130

OUTPUT

723;"PU;PA 0,0;PD;"

 

140

OUTPUT

723;"PR 300,0,0,200,-300,0,0,-200;"

Draw a rectangle using PR.

5-5