%N vpadjcg %F $MIR/src/subs/cgpgsubs.for
%D Adjust viewport if equal scales requested
%P nebk
%: plotting
%B
      subroutine vpadjcg (lh, hard, eqscale, scale, vxmin, vymin, vymax,
     *   nx, ny, blc, trc, tfvp, wdgvp, vxsize, vysize)

      integer lh, nx, ny, blc(*), trc(*)
      real vxsize, vysize, vxmin, vymin, vymax, scale(2), tfvp(4),
     *  wdgvp(4)
      logical eqscale
      character hard*(*)
  ---------------------------------------------------------------------
  So far everything has been worked out for unequal scales in
  x and y.  If the user requests equal scales, or gives the scales,
  we need to make some adjustments to the viewport

  Inputs
    lh           Handle of image
    hard         YES for hardcopy device
    eqscale      True means equals scale requested, else different
    nx,ny        Number of sub-plots in x and y
    blc,trc      Window in pixels
  Input/Output
    scale        scales in x and y in linear axis units/mm
                 RA axes are radians on the sky per mm
    vxmin        Left hand side of encompassing view port
    vymin,vymax  Bottom and top of encompassing view port
    tfvp         Transfer function fiddle plot viewport. SHould be all
                 zero if no fiddling.
    wdgvp        Wedge viewport.  All zero fo no wedge
    vxsize       Size of viewport for sub-plots in normalized device
    vysize       coordinates
