home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 September / macformat-004.iso / Demos / Asymptote / Examples / Utility Scripts / graphpane_setup < prev    next >
Encoding:
Text File  |  1994-06-15  |  742 b   |  26 lines  |  [TEXT/DWat]

  1. % graphpane_setup numxpanes numypanes xpanegap ypanegap
  2.  
  3. % Call this script before running graphpane.
  4.  
  5. %    numxpanes - number of panes in x direction
  6. %    numypanes - number of panes in y direction
  7. %    xpanegap  - gap between panes (in page units)
  8. %    ypanegap  - gap between panes (in page units)
  9. %        •Note: gaps can be zero.
  10.  
  11. % •Note: Uses the currennt setting of the graphframe
  12. % for the frame which bounds the array of panes.
  13.  
  14. set numxpanes &1
  15. set numypanes &2
  16. set xpanegap &3
  17. set ypanegap &4
  18.  
  19. set gleft_panes gleft
  20. set gright_panes gright
  21. set gbottom_panes gbottom
  22. set gtop_panes gtop
  23.  
  24. set panewidth gright_panes gleft_panes - numxpanes 1 - xpanegap * - numxpanes /
  25. set paneheight gtop_panes gbottom_panes - numypanes 1 - ypanegap * - numypanes /
  26.