%N pgwnad %F $MIR/src/pgwnad.f
%D Set window and adjust viewport to same aspect ratio
%B
      SUBROUTINE PGWNAD (X1, X2, Y1, Y2)
      REAL X1, X2, Y1, Y2

 Change the window in world coordinate space that is to be mapped on
 to the viewport, and simultaneously adjust the viewport so that the
 world-coordinate scales are equal in x and y. The new viewport is
 the largest one that can fit within the previously set viewport
 while retaining the required aspect ratio.

 Arguments:
  X1     (input)  : the x-coordinate of the bottom left corner
                    of the viewport.
  X2     (input)  : the x-coordinate of the top right corner
                    of the viewport (note X2 may be less than X1).
  Y1     (input)  : the y-coordinate of the bottom left corner
                    of the viewport.
  Y2     (input)  : the y-coordinate of the top right corner of the
                    viewport (note Y2 may be less than Y1).
