The Axes And Their Labels - HP 7470A Interfacing And Programming Manual

Graphics plotter
Hide thumbs Also See for 7470A:
Table of Contents

Advertisement

NOTE: If compatibility with other HP plotters is desired, PA should be
used to begin plotting, and raising and lowering the pen should be
controlled with separate PU and PD commands. In addition, the
stricter syntax of other plotters would be required. I
The Axes and Their Labels
We are now ready to draw and label the axes. The label size is set by
the absolute size command SI .2 , .3 ;. This creates characters which
are slightly larger than characters of default character size specified by
the IN command. The tick length is established by the tick length com­
mand TL 1.5,0. The resulting ticks will be 1.5%of the horizontal or
vertical distances between the scaling points. No negative portion of
the tick will be drawn; ticks will be entirely above the X-axis and to the
right of the Y—axis.
'
Axes are commonly drawn using a loop; this program in BASIC uses
FOR...NEXT loops. First, we shall draw the X—axis. Let X range from 1
to 12 representing the 12 months for which we have data. In the loop
we will do four things: move to the integer location on the axis, draw a
tick mark, position the pen below the axis, and draw the label. Note
that the X—parameterof the plot command is a variable. You will need
to know how to send a variable between strings of fixed characters.
The method will differ from computer to computer; consult your com­
puter's documentation and Plotting with Variables in Chapter 3 of this
manual. If you have an HP-IB or HP—IL plotter, refer also to Sending
and Receiving Data in Chapter 9 or 11. The XT instruction draws a
tick, whether the pen is up or down. The pen is up here so we do not
draw the axis line again. You might want to use PD, drawing over the
frame line if your want your axis line a bit darker, or you might want
to redraw the axis again later with a wide pen.
There are several techniques used here to draw the alphabetic labels.
First, so we can use a looping technique, we have placed the labels in a
data statement. (At some point, you might want to access data for the
latest 12 months. If your data were stored together with a date code,
you could use a similar technique to read the label and data from some
file and properly label your graph for the data you were then plotting.)
Secondly, we have used the CP instruction together with BASIC for­
matting (using semicolons to suppress extra characters between print
fields) to center the label under the tick. The base of the tick mark is the
pen position after the tick is drawn. By moving one—thirdcharacter
space back and one line down, the single character label is centered
under the tick with enough space so it can be easily read. Finally, the
axis title, CALENDAR MONTH, is centered and drawn under the axis.
PUTTING THE COMMANDS TO WORK 8-3

Advertisement

Table of Contents
loading

Table of Contents