Grids And Coordinate Axes; Graph Plotting Routines - DEC VT55 Programming Manual

Table of Contents

Advertisement

SUf.{f~ested
PLOT55 Applications
CALL PLOTSS(13,72"ISTAT)
CALL PLOTSS(l3,74"ISTAT)
CALL PL0T5S(2,1 +SI2"IST AT)
RETURN
END
The statement CALL INIT will first clear all alphanumeric text from the screen and then will disable all
graphic figures, clearing the screen of graphic displays as well. INIT is therefore a good example of a
"starting routine" for a graphic program.
B.2
GRIDS AND COORDINATE AXES
2
3
4
SUBROUTINE GRID(IDX,IDY)
COMMON
1ST
A TUS/IST A T(l6)
CALL PL0T55 (2, 1 + 32+64"IST AT)
00 1 1=I,SI2
CALL PLOTS5(5,I-l,0,ISTAT)
DO 21=1,236
CALL PLOT55 (4,0,I-l,IST AT)
00 3 I=I,512,IDX
CALL PLOT55(5,I-l,I,ISTAT)
00 4 1=1,236,IDY
CALL PLOT55(4,I,I-l,IST AT)
RETURN
END
The numbers you supply for lOX and lOY in a CALL GRID statement will be the spacing in screen units
between the vertical and horizontal lines, respectively. GRID will therefore display a rectangular grid on
the screen, which can be superimposed on other figures such as graphs and histograms. If GRID is called
several times in the same program, it will erase any old grid before displaying a new one.
To display only a y axis at the left edge and an x axis at the bottom of the screen, use a CALL GRID state-
ment with lOX equal to any integer greater than S11 and lOY any integer greater than 23S.
The markers described in Chapter 2 (ICMD = 6) are the best way to mark off a graph in the x direction.
You may, however, want to put a vertical scale on a graphic figure
as
well. With a routine such as GRID,
you could, for example, scale the screen vertically in increments of 20 units by calling GRID with lOX>
S11 and lOY
=
20.
B.3
GRAPH PLOITING ROUTINES
The examples in this section suggest "canned" procedures for the most common use of
VTSS:
plotting
graphs or shaded graphs of already computed data.
SUBROUTINE GRAPH (N ,IARRA Y)
COMMON
1ST
ATUS/IST AT(l6)
DIMENSION IARRAY(SI2)
NUMBER=IST
AT(8)/8
CALL PLOT5S(7,O,O,IST AT)
CALL PLOTSS(8,S12,0,ISTAT)
CALL PLOTSS(2,1 +(NUMBER+ 1)*2,(NUMBER+ 1)*10,ISTAT)
CALL PLOTSS(3,- N,IARRA Y,IST AT)
CALL PLOTSS(l,l-NUMBER"ISTAT)
RETURN
END
B-2

Advertisement

Table of Contents
loading

Table of Contents