%N wedge %F $MIR/src/subs/tvsubs.for
%D Load a wedge onto a TV device with user specified ranges.
%P jm
%: image-data, tv, display
%B
      subroutine wedge(map, Nxy, Dir, chan, x0, y0, pmin, pmax, width)

      implicit none
      integer Nxy, Dir, chan, x0, y0, width
      real map(Nxy), pmin, pmax

  Displays a wedge of real numbers on the TV device scaled to the
  limits of the device.  If Dir is 1 and Nxy is too large (MAXDIM),
  the wedge is truncated (to MAXDIM).

  Input:
    map(Nxy)     Input real array of values.
    Nxy          The dimension of the wedge array.
    Dir          The direction to stretch the wedge.  If ``Dir'' is 0,
                 then the array is displayed along the x direction
                 and repeated ``width'' pixels upward; if ``Dir'' is 1,
                 then the array is displayed along the y direction
                 and repeated ``width'' pixels to the right.  Any
                 other value of Dir is treated as if Dir was set to 0.
    chan         The TV channel to load the wedge.
    x0, y0       The lower left corner to start loading the wedge.
    pmin         The minimum value of the array.
    pmax         The maximum value of the array.
    width        The number of pixels to repeat the wedge in
                 direction ``Dir'' on the display.

  Output:
    none
