1C*PGSVP -- set viewport (normalized device coordinates)
2C%void cpgsvp(float xleft, float xright, float ybot, float ytop);
3C+
4      SUBROUTINE PGSVP (XLEFT, XRIGHT, YBOT, YTOP)
5      REAL XLEFT, XRIGHT, YBOT, YTOP
6C
7C Change the size and position of the viewport, specifying
8C the viewport in normalized device coordinates.  Normalized
9C device coordinates run from 0 to 1 in each dimension. The
10C viewport is the rectangle on the view surface "through"
11C which one views the graph.  All the PG routines which plot lines
12C etc. plot them within the viewport, and lines are truncated at
13C the edge of the viewport (except for axes, labels etc drawn with
14C PGBOX or PGLAB).  The region of world space (the coordinate
15C space of the graph) which is visible through the viewport is
16C specified by a call to PGSWIN.  It is legal to request a
17C viewport larger than the view surface; only the part which
18C appears on the view surface will be plotted.
19C
20C Arguments:
21C  XLEFT  (input)  : x-coordinate of left hand edge of viewport, in NDC.
22C  XRIGHT (input)  : x-coordinate of right hand edge of viewport,
23C                    in NDC.
24C  YBOT   (input)  : y-coordinate of bottom edge of viewport, in NDC.
25C  YTOP   (input)  : y-coordinate of top  edge of viewport, in NDC.
26C--
27C 13-Dec-1990  Make errors non-fatal [TJP].
28C-----------------------------------------------------------------------
29      INCLUDE  'pgplot.inc'
30      LOGICAL  PGNOTO
31      REAL     XS, YS
32C
33      IF (PGNOTO('PGSVP'))  RETURN
34      IF (XLEFT.GE.XRIGHT .OR. YBOT.GE.YTOP) THEN
35          CALL GRWARN('PGSVP ignored: invalid arguments')
36          RETURN
37      END IF
38C
39      XS = PGXSZ(PGID)/PGXPIN(PGID)
40      YS = PGYSZ(PGID)/PGYPIN(PGID)
41      CALL PGVSIZ(XLEFT*XS, XRIGHT*XS, YBOT*YS, YTOP*YS)
42      END
43