/*      PROGRAM PGDE12 */
//-----------------------------------------------------------------------
// Demonstration program for PGPLOT: use of PGPAP to change the
// size of the view surface.
//
//
// Note that PGPAP must be called either immediately after PGOPEN or
// immediately before PGPAGE, and it affects all subsequent pages until
// the next call to PGPAP. (In the following code, PGENV calls PGPAGE.)
//-----------------------------------------------------------------------

      print "Demonstration of routine PGPAP to change the size of"
      print "the view surface"
      print ""

      if (pgopen("?") <= 0) break

      print "First page: size is 7 x 3.5 inch"

      pgpap 7.0,0.5
      pgenv 0.0,1.0,0.0,2.0,0,0
      pglab "x", "y", "1"

      print "Second page: size to 6 x 6 inch"

      pgpap 6.0,1.0
      pgenv 0.0,1.0,0.0,2.0,0,0
      pglab "x", "y", "2"

      print "Third page: same size as second"

      pgenv 0.0,1.0,0.0,2.0,0,0
      pglab "x", "y", "3"

      pgclos
