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

  1. /* Sets up the device "dev" for plotting, dividing the page into "nx" */
  2. /* by "ny" subpages. */
  3.  
  4. #include "plplot.h"
  5. #include <math.h>
  6.  
  7. void plbeg(dev,nx,ny)
  8. PLINT dev, nx, ny;
  9. {
  10.    PLFLT scale, def, ht;
  11.  
  12.    if ((nx <= 0) || (ny <= 0 ))
  13.       plexit("Cannot have negative number of subpages in plstar.");
  14.  
  15.    scale = 1.0/sqrt((double)ny);
  16.    slev(1);
  17.    grbeg(dev);
  18.    ssub(nx,ny,0);
  19.  
  20.    /* Set up character, symbol and tick sizes for requested number of */
  21.    /* subpages */
  22.  
  23.    gchr(&def,&ht);
  24.    schr((PLFLT)(def*scale),(PLFLT)(def*scale));
  25.    gsym(&def,&ht);
  26.    ssym((PLFLT)(def*scale),(PLFLT)(def*scale));
  27.    gmaj(&def,&ht);
  28.    smaj((PLFLT)(def*scale),(PLFLT)(def*scale));
  29.    gmin(&def,&ht);
  30.    smin((PLFLT)(def*scale),(PLFLT)(def*scale));
  31. }
  32.