The Tick Instructions, Xt And Yt; The Tick Length Instruction, Tl - HP 7470A Interfacing And Programming Manual

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

Advertisement

The Tick Instructions, XT and YT
■lIMHHiailtfil
The tick instruction, XT, draws a vertical X-tick at the
current location. The tick instruction, YT, draws a horizontal Y-tick at
the current pen location.
mm
These instructions can be used to draw tick marks on axes,
draw grid lines by making the tick length 100%, or draw horizontal or
vertical lines either centered on or ending at the current pen position.
E Q 3 E E I
XT
(terminator)
or
YT
(terminator)
EXPLANATION
Neither instruction requires parameters; numeric
parameters are ignored. The terminator should be included to complete
the command.
The tick mark will be drawn at the current pen position whether the
pen is up or down.
The tick length is specified by the tick length instruction, TL. If no tick
length is specified, the length defaults to 0.5% of (P2
X
- Plx) for YT or
0.5% of (P2
y
- Ply) for XT for each (positive and negative) portion of
the tick. Refer to The Tick Length Instruction, TL, which follows.
The following example draws a horizontal line 3000 plotter units long,
places X-ticks at the endpoints and at X-locations 1200 and 2200, and
raises and stores the pen.
" I N ; S P 2 ; P R 2 0 0 , 5 0 0 ; P D ; X T ; P R 1 0 0 0 , 0 ; X T ; "
" PR1 0 0 0 , 0 ; XT; PR1 0 0 0 , 0 ; XT; PU; SPO;"
The Tick Length Instruction, TL
E H E H 1
The tick length instruction, TL, specifies the length of
the tick marks drawn by the plotter. The tick lengths are specified as a
percentage of the horizontal and vertical distances between the scaling
points PI and P2.
The instruction can be used to set the length of both positive
and negative portions of tick marks. The instruction can be used with
only one parameter to suppress the negative portion of a tick mark, or
with a first parameter of zero to suppress the positive portion of the
tick. Setting the tick length, tp, to 100 enables the user to draw grids
easily, using XT and YT instructions.
4-2 ENHANCING THE PLOT
M ' J L ' I M : !
TL
tp (,tn) (terminator)
or
TL
(terminator)
B33E&EQDEI
Both parameters must be between -128 and +127.9999.
Use of positive parameters is recommended. For most applications,
parameters will be between 0 and 100.
The up and right tick length, tp, determines the length of the upward
portion of the tick marks drawn along the X-axis and the right-side
portion of the tick marks drawn along the Y-axis, taking P I as t h e
lower-left corner.
The down and left tick length, tn, determines the length of the down­
ward portion of the tick marks drawn along the X-axis and the left-side
portion of the tick marks drawn along the Y-axis, taking P I as t h e
lower-left corner.
The values specified by parameters tp and tn are a percentage of t h e
vertical scale length (P2
y
— Ply) when used with the XT instruction,
and a percentage of the horizontal scale length (P2
X
— Plx) when used
with the YT instruction. Note the actual tick length is a function of the
scaling established by PI and P2, and the length of ticks on the X- a n d
fM
Y-axes will be different even if the same tick length percentage value is
H
specified for both XT and YT, unless the area defined by P i and P2 is
^
square.
The plotter, when initialized, automatically sets the tick length values
to 0.5% of the scaling lengths (P2
y
- Ply) and (P2
X
- Plx). A T L
command with no parameters will default to the same values. A T L
command with only one parameter specifies the length of tp, a n d t n
will be zero. A negative tp parameter will draw a negative tick just a s
would be drawn by a tn with a positive parameter. Likewise, a negative
tn parameter will draw a positive tick. Use of negative parameters is
not recommended both because the results are more difficult to visualize
and programs with negative parameters will not be compatible with
other HP plotters. A TL command remains in effect until another TL
command with valid parameters is executed or an IN or DF instruction
is executed.
The following example draws both tick marks and grid lines. The grid
lines are a result of specifying 100% tick length. The horizontal tick
marks on the leftmost grid line are drawn using the default tp,tn. The
tick marks on the second grid line have a positive tick length of 1% and
no negative tick. The tick marks on the third grid line have no positive
tick and a negative tick length of 5%. Note that these last tick marks
are drawn by the YT instruction even though the PU instruction is in
effect. However, the moves to the next tick location are made with the
pen up, and hence, the grid line is not retraced. A reduced version of the
plot follows.
ENHANCING THE PLOT 4-3

Advertisement

Table of Contents
loading

Table of Contents