Line Graph support in 2 dimensions

lmark | scale, line | axis (Example) | symbol, number

LMARK
NAME
    lmark - Plot mark to add on LINE graph

SYNOPSIS
      call lmark(lmk, size)
  lmk     [int]   Mark identifier (0-9 or else)
                  If this value is 0/1/2/3/4/5/6/7/8/9, mark form is same
                  as the case of 'pmark' routine with 1st argument value
                  of 2/0/4/8/9/3/1/5/6/7, respectively.
                  Otherwise, mark will be small (1/3 of specified size)
                  black filled circle. (See Mark list below.)
  size    [float] Dimension (in cm) of mark

EXAMPLE
      

      call psopn('lmark.ps', 'a4p')
      call plots(2., 2.)
      do 20 i=0,10
        x = float(i) + 0.5
        call plot(x, 0.5, 3)
        call lmark(i, 0.7)
        if (i .eq. 10) then
          call symbol(x-0.3, 1.6, 0.3, '<0', 0., 2)
          call symbol(x-0.3, 1.2, 0.3, '>9', 0., 2)
        else
          call number(x-0.15, 1.4, 0.3, float(i), 0., -1)
        endif
   20 continue
      call wrect(0., 0., 11., 1.)
      call plote
      call pscls
      stop
      end


SCALE, LINE
NAME
    scale - Automatic scaling for given array data
    line  - Draw array data

SYNOPSIS

      call scale(va, axlen, npt, inc)
  va      [float] Coordinate data array (or its 1st element location)
  axlen   [float] Length (in cm) of Axis (no less than 2cm)
  npt     [int]   Number of data points (no less than 2)
  inc     [int]   Interval of each data in the array (must be positive)
              Initial value (firstv) and scaling (deltav) are given in the
            elements 'va(npt*inc + 1)' and 'va(npt*inc + inc + 1)', provided
            the 1st data element is va(1).  The array must have enough size.

      call line(xa, ya, npt, inc, ltype, mark)
  xa, ya  [float] Coordinate data arrays (or its 1st element location)
  npt     [int]   Number of data points (must be positive)
  inc     [int]   Interval of each data in the array (must be positive)
  ltype   [int]   If ltype>=0, data points are connected by solid line.
                  If ltype<>0, marks are drawn on each |ltype| points.
  mark    [int]   'lmk' code number specifying the mark
                  See 'lmark' routine on the mark of 'lmk' code number.
              Before calling this routine, Initial value and scaling for both
            arrays 'xa' and 'ya' must be established, by calling 'scale' or
            otherwise.  [The relative positions of them from the 1st element
            are (npt*inc) and (npt*inc + inc).]


AXIS
NAME
    axis - Draw a coordinate axis

SYNOPSIS
      call axis(xp, yp, text, ltx, axlen, angle, firstv, deltav)
  xp, yp  [float] Coordinates (in cm) of Start point
  text    [char]  Label string for Axis Name
  ltx     [int]   string length (must not be 0)
                  If positive, the Label is written on counter-clockwise side
                  of the axis. Otherwise on clockwise side.
  axlen   [float] Length (in cm) of Axis (no less than 2cm)
  angle   [float] Axis direction (in degrees counter-clockwise from +X)
  firstv  [float] Initial value of graduation
  deltav  [float] Scaling for 1cm increment of axis
                  (The value 0. is treated as 1.0/cm.)

EXAMPLE

      dimension p(3,12)
      do 10 i=1,10
        p(1,i) = float(i-1)
        p(2,i) = sqrt(p(1,i))
        q4 = p(1,i) - 4.
        p(3,i) = q4*q4 * 0.15
   10 continue
      call scale(p(1,1), 10., 10, 3)
      call scale(p(3,1), 10., 10, 3)
      p(2,11) = p(3,11)
      p(2,12) = p(3,12)
      call psopn('axis.ps', 'a4p')
      call plots(2., 2.)
      call axis(0., 0., 'Axis-X', -6, 10., 0., p(1,11), p(1,12))
      call axis(0., 0., 'Y=sqrt(X)', 9, 10., 90., p(3,11), p(3,12))
      call line(p(1,1), p(2,1), 10, 3, 1, 4)
      call line(p(1,1), p(3,1), 10, 3, 1, 10)
      call plote
      call pscls
      stop
      end

      


SYMBOL, NUMBER
NAME
    symbol - Draw text string with Courier Font
    number - Draw value of floating number with Courier Font

SYNOPSIS
      call symbol(xp, yp, high, text, ang, nc)
      call number(xp, yp, high, fv, ang, ndec)
  xp, yp  [float] Coordinates (in cm) of the point to start drawing
                  If xp==yp==999, present location of pen becomes starting
                  point.  If either of xp or yp is 999., only corresponding
                  coordinates value is maintained.
  high    [float] Height (in cm) of effective character size
  ang     [float] Direction angle to draw text (in degrees counter-clockwise
                  from +X axis)
  text    [char]  Text string to be drawn with Courier font, or 'lmk' code
                  single byte if nc <= 0.
  nc      [int]   Number of bytes of text string (>0).
                  If nc > 0, [nc] byte(s) text is drawn. Otherwise, 1st byte
                  of text is treated as 'lmk' code to draw mark, and if nc is
                  -2 or less, a line is drawn to target location from the
                  current pen location.
  fv      [float] Value to draw
                  Integer part length must not exceed 21 columns including
                  minus sign if negative.
  ndec    [int]   number of columns of fraction part to show (-9 to +9)
                  If minus, only integer part without decimal point is drawn,
                  and the lowermost [|ndec| - 1] column(s) are omitted when
                  ndec <= -2.
                  (The values less than -9 and larger than +9 are regarded as
                  -9 and +9, respectively.)