home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog_c / rexxplpt.lzh / REXXPLPLOT / EXAMPLES / EXAMPLE09.PLOT < prev    next >
Text File  |  1991-08-16  |  861b  |  34 lines

  1. /* Example09.plot - Demonstration of contour plotting */
  2. /* Modified for RexxPlPlot by Glenn M. Lewis - 9/12/89 */
  3.  
  4. address 'PlPlot'
  5. say 'Please be patient...'
  6.       
  7. NPTS=41
  8. /* Special RexxPlPlot function */
  9. 'plset_tr(0.05,0.0,-1.05,0.0,0.05,-1.05);'
  10.     do i=1 to 11; clevel.i = (i-6)*0.2; end i
  11. mark=1500
  12. space=1500
  13.  
  14.       do i=1 to NPTS
  15.         xx = (i-1-(NPTS/2))/(NPTS/2)
  16.         do j=1 to NPTS
  17.           yy = (j-1-(NPTS/2))/(NPTS/2) - 1.0
  18.           z.i.j = xx*xx - yy*yy;
  19.           w.i.j = 2*xx*yy;
  20.         end j
  21.       end i
  22.  
  23.       'plstar(1,1);'
  24.       'plenv(-1.0,1.0,-1.0,1.0,0,0);'
  25.       'plcont(z,NPTS,NPTS,1,NPTS,1,NPTS,clevel,11,xform);'
  26.       'plstyl(1,mark,space);'
  27.       'plcont(w,NPTS,NPTS,1,NPTS,1,NPTS,clevel,11,xform);'
  28.       'pllab("X Coordinate", "Y Coordinate","Contour Plots of Saddle Points");'
  29.       'pltext();'
  30.       'plend();'
  31.  
  32. exit 0
  33.  
  34.