PGPLOT Module: PGLCUR -- draw a line using the cursor


SUBROUTINE PGLCUR (MAXPT, NPT, X, Y)
INTEGER MAXPT, NPT
REAL X(*), Y(*)

Interactive routine for user to enter a polyline by use of
the cursor. Routine allows user to Add and Delete vertices;
vertices are joined by straight-line segments.


Arguments
MAXPT (input) : maximum number of points that may be accepted.
NPT (in/out) : number of points entered; should be zero on
first call.
X (in/out) : array of x-coordinates (dimension at least MAXPT).
Y (in/out) : array of y-coordinates (dimension at least MAXPT).

Notes:

(1) On return from the program, cursor points are returned in
the order they were entered. Routine may be (re-)called with points
already defined in X,Y (# in NPT), and they will be plotted
first, before editing.

(2) User commands: the user types single-character commands
after positioning the cursor: the following are accepted:
A (Add) - add point at current cursor location.
D (Delete) - delete last-entered point.
X (eXit) - leave subroutine.