The Symbol Mode Instruction, Sm - HP 7470A Interfacing And Programming Manual

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

Advertisement

1 PRINTER I S
7 0 5 , 8 0
10 PRINT
20 FOR 1=
30 PRINT
40 NEXT I
50 PRINT
60 GOSUB
70 PRINT
80 GOSUB
90 PRINT
'IN;PR300,279;SP2;PD;TL100;XT;"
1 TO 10
'PR1000,0;XT;"
'TL;PU;PR300,279;PD"
1000
'TL1,0;PU;PR1300,2?9;PD;"
1000
'TLO,5;PU;PR2300,279;"
100 GOSUB 1000
110 PRINT "PR300,7479;TL100;YT;PU;SP0;"
120 STOP
1000 ! SUBROUTINE TO DRRW TICKS
1010 FOR J-1 TO 9
1020 PRINT "PR0,720;YT;"
1030 NEXT J
1040 RETURN
1050 END
i'he Symbol Mode Instruction, SM
E 3
The symbol mode instruction, SM, is used with PA and
PR commands, and provides the means to draw a single character
)
which is centered at the end of each vector.
)
4-4 ENHANCING THE PLOT
)
)
F E i y t
Symbol mode plotting can be used to draw a specified char­
acter at each data point and thus to create scattergrams, geometric
drawings, or multiple-line graphs where lines are easy to differentiate.
EHlILKI SM
c (terminator)
or
SM
(terminator)
l^ililfilMiUMI
An SM command without parameters turns off symbol
mode. When a parameter is present, it is limited to a single character,
which must be one of the printing characters of the character set cur­
rently selected.
After an SM command has been executed, subsequent PA and P R
commands function as described in the previous chapter, except t h a t
the specified symbol mode character is drawn at the end of each vector
and is centered on the plotted point. (A character drawn at a point
using the label command, LB, would not be centered on the point.)
Drawing of the character is independent of the current pen state (up or
down); the character is always drawn at each point specified in the PA
and PR command.
The character is drawn according to the character set selected when the
SM command is executed. The character does not change even if a new
set is selected. An SM command remains in effect until another valid
SM command is executed or an IN or DF command is executed. The
size (SI and SR), slant (SL), and direction (DI and DR) commands
affect the character drawn.
An SM command can specify any printing character (decimal values
33 through 127). The semicolon (decimal value 59) is used only to cancel
symbol mode (SM;) and cannot be selected as the symbol to be drawn
at the endpoint of each vector. Specifying a space (decimal value 32) or
any control character also cancels symbol mode.
The following example shows symbol mode plotting with the pen u p
and the pen down as might be used in line graphs, geometric drawings,
and scattergrams.
" I N ; S P 1 ; S M * ; P R 2 0 0 , 1 0 0 0 ; "
" P D 4 O 0 , 1 2 3 0 , 6 0 0 , 1 5 6 0 , 9 0 0 , 1 6 7 0 , 1 5 0 0 , 1 6 0 0 , 2 0 0 0 , 2 0 0 0 : "
"PU;SM;PR100,300;SM3;"
"PR300,500,500,450,900,850,1350,1300,2100, 1350PU;"
"SM;PR1900,560;PD;SMY;PR3300, 1250;"
" S M Z ; P R 3 5 0 0 , 9 5 0 ; S M X ; P R 1 9 0 0 , 5 6 0 ; P U ; S P O ; "
ENHANCING THE PLOT 4-5

Advertisement

Table of Contents
loading

Table of Contents