next up previous contents index
Next: SUBROUTINE LSPLOT Up: MASTER Subroutines Previous: SUBROUTINE HIST3D

SUBROUTINE LCNTR

   LCNTR plots a contour plot of a uniformly sampled 2-d input array. LCNTR is similar to CNTRPLT but permits hardware line types. The input consists of a 2 dimensional grid of v values. A contour is determined by linearily interpolating the edges of the square formed by 4 adjacent points (see CNTRPLT). LCNTR connects the line segments of constant contour before plotting and can optionally label the contour lines with alphabetic codes or the numerical value of the contour. Log axes are available but data points are plotted using linear positioning. (Note: common block scale factors will be log values if the log axes are selected.)

When the contour levels are input (nl>0), contours can be suppressed in a region by setting the value of the input array greater than 1.E20. LCNTR uses the contouring routine GCONTR.  

CALL LCNTR(v,ndx,ndy,nx,ny,nl,cl,n,m,iflag,iw,xl,yl,xt,nxt,yt,nyt,
                t,nt,xm,xx,ym,yx<<,ic>,l>)

v       (R): 2-d array of values dimensioned v(ndx,ndy)
ndx,ndy (I): dimensions of data array
nx,ny   (I): number of points in each array dimension
nl      (I): number of uniformly spaced contour levels,
             < 0 : max and min of v are used to define contours.
                   the (j)th contour is computed from max,min of 
                   input array according to,
                     (j-1)*(max(v)-min(v))/(nl-1)+min(v)
             > 0 : number of contour levels specified in cl
cl      (R): array of contour levels dimensioned cl(nl)
             if nl < 0 contour levels used are (returned) in cl
n       (I): contour labeling option
             < 0 label with contour value (number with n digits
                 to the right of the decimal point)
             = 0 no labels on contours
             > 0 label contours with ASCII characters (nl <= 26)
m       (I): minimum line segments before contour labeled (m > 1)
iflag   (I): option flag
             < 0 : do not close LONGLIB after plotting
             = 0 : close LONGLIB--no plot produced
             > 0 : close LONGLIB after plotting
 (magnitude) >10000 : do not initialize LONGLIB before plotting
   (1's digit)  = 1 : plot x linear, y logarithmic (base 10)
                = 2 : plot x logarithmic, y linear
                = 3 : plot x logarithmic, y logarithmic
                = 4 : plot x linear, y linear
   (10's digit) = 0 : no axes or title plotted
                = 1 : axes with axis line/ticks on top and sides
                = 2 : plot solid cartesian grid
                = 3 : plot ticked cartesian grid without box
                = 4 : plot ticked cartesian grid with box
                = 5 : plot ticked cartesian grid, box w/axis ticks
                = 6 : plot without box or cartesian grid
                = 7 : plot solid logarithmic grid
                = 8 : plot dotted logarithmic grid
                = 9 : plot ticked logarithmic grid
   (100's)      = 0 : Ask which screen device to use
               <> 0 : Screen Device Number (see FRAME)
iw      (I): working array dimensioned at least (2*nx*ny+1)/31
xl      (R): x axis length in inches (integer valued)
             > 0 : use input scaling in xm,xx for axis
             < 0 : use smoothed input scaling in xm,xx for axis
yl      (R): y axis length in inches (integer valued)
             > 0 : use input scaling in ym,yx for axis
             < 0 : use smoothed input scaling in ym,yx for axis
xt      (C): x axis title string
nxt     (I): number of characters in xt
            < 0 : axis ticks on top of x axis
            = 0 : no axis
            > 0 : axis ticks on bottom of x axis (normal)
yt      (C): y axis title string
nyt     (I): number of characters in yt
            < 0 : axis ticks on right of y axis
            = 0 : no axis
            > 0 : axis ticks on left of y axis (normal)
t      (C): plot title string
nt     (I): number of characters in t (limited to 99 characters)
            < 0 : use color array
            = 0 : no title
            > 0 : do not use color array
            if |nt|/100 > 0 : use line type list
xm     (R): input minimum value of x axis
xx     (R): input maximum value of x axis
ym     (R): input minimum value of y axis
yx     (R): input maximum value of y axis
(NOTE: color array accessed if nt < 0 or |nt|/100 >0)
ic     (I): color array
            ic(1) : color for grid
            ic(2) : color for axis lines
            ic(3) : color for axis numbers
            ic(4) : color for axis titles
            ic(5) : color for axis exponent
            ic(6) : color for title (return)
            ic(7) : color for contour line 1
            ic(8) : color for contour line 2
            ic(9) :    etc.
l       (I): line type list for contours (accessed if |nt|/100>0)

common /ccntrplt/xmr,dxr,ymr,dyr

xmr   (R): returned value of xmin
dxr   (R): returned value of scale factor (xmax-xmin)/xlen
ymr   (R): returned value of ymin
dyr   (R): returned value of scale factor (ymax-ymin)/ylen



David Long
Wed Jun 12 10:34:11 MDT 1996