home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 344b.lha / plplot_v2.6 / src / setphy.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-27  |  570 b   |  23 lines

  1. /* Sets up physical limits of plotting device and the mapping between */
  2. /* normalized device coordinates and physical coordinates */
  3.  
  4. #include "plplot.h"
  5.  
  6. void setphy(xmin,xmax,ymin,ymax)
  7. PLINT xmin,xmax,ymin,ymax;
  8. {
  9.     PLFLT xpmm, ypmm, mpxscl, mpyscl;
  10.  
  11.     sphy(xmin,xmax,ymin,ymax);
  12.     sdp((PLFLT)(xmax-xmin),(PLFLT)(xmin),(PLFLT)(ymax-ymin),
  13.          (PLFLT)(ymin));
  14.  
  15.     gpixmm(&xpmm,&ypmm);
  16.     mpxscl = xpmm;
  17.     if (xmax <= xmin) mpxscl = -xpmm;
  18.     mpyscl = ypmm;
  19.     if (ymax <= ymin) mpyscl = -ypmm;
  20.     smp(mpxscl,(PLFLT)(xmin), mpyscl,(PLFLT)(ymin));
  21. }
  22.  
  23.