| 1 |
C Copyright(C) 1999-2020 National Technology & Engineering Solutions |
| 2 |
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
C NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
C |
| 5 |
C See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
C======================================================================= |
| 8 |
SUBROUTINE GRAXES (XYSAME, WVIEW, DVIEW, WXATIC, WYATIC, |
| 9 |
& TXLAB, TYLAB) |
| 10 |
C======================================================================= |
| 11 |
|
| 12 |
C --*** GRAXES *** (GRPLIB) Draw axes (PLT) |
| 13 |
C -- Written by Amy Gilkey - revised 02/20/87 |
| 14 |
C -- |
| 15 |
C --GRAXES sets up and draws the axes for the plot. It determines |
| 16 |
C --"good" numbers for the axes numbers (including the exponents) and |
| 17 |
C --sets the label/numbering size. |
| 18 |
C -- |
| 19 |
C --Parameters: |
| 20 |
C -- XYSAME - IN - true iff the X and Y axis have the same scale; |
| 21 |
C -- i.e., they are the same type although the values may differ |
| 22 |
C -- WVIEW - IN - the window corners (left, right, bottom, top) |
| 23 |
C -- in window (user) coordinates |
| 24 |
C -- DVIEW - IN - the window corners (left, right, bottom, top) |
| 25 |
C -- in device coordinates |
| 26 |
C -- WXATIC, WYATIC - IN - the X and Y axis tick-mark interval; |
| 27 |
C -- default if equal zero or invalid |
| 28 |
C -- TXLAB, TYLAB - IN - the X and Y axis labels |
| 29 |
|
| 30 |
C --Routines Called: |
| 31 |
C -- PLTGPH - (PLTLIB) Draw the axes with labels |
| 32 |
C -- PLTSTG - (PLTLIB) Set graph parameter |
| 33 |
C -- 1, 2 = (KXORIG, KYORIG) X, Y axis origin location |
| 34 |
C -- 3, 4 = (KXLENG, KYLENG) X, Y axis length |
| 35 |
C -- 11 = (KSCALE) axes parameters (see documentation) |
| 36 |
C -- 22, 47 = (KXNUMS, KYNUMS) X, Y axis number size |
| 37 |
C -- 23, 48 = (KXLABS, KYLABS) X, Y axis label size |
| 38 |
C -- GRAPAR - (GRPLIB) Select axis parameters |
| 39 |
|
| 40 |
PARAMETER (KLFT=1, KRGT=2, KBOT=3, KTOP=4) |
| 41 |
PARAMETER (KXORIG=1, KYORIG=2, KXLENG=3, KYLENG=4, KSCALE=11) |
| 42 |
PARAMETER (KXNUMS=22, KXLABS=23, KYNUMS=47, KYLABS=48) |
| 43 |
|
| 44 |
LOGICAL XYSAME |
| 45 |
REAL WVIEW(KTOP), DVIEW(KTOP) |
| 46 |
REAL WXATIC, WYATIC |
| 47 |
CHARACTER*80 TXLAB, TYLAB |
| 48 |
|
| 49 |
LOGICAL LDUM, PLTSTG, PLTSTG1 |
| 50 |
REAL BUF(11) |
| 51 |
|
| 52 |
C --Set device axis start and length |
| 53 |
|
| 54 |
DXAST = DVIEW(KLFT) |
| 55 |
DYAST = DVIEW(KBOT) |
| 56 |
DXALEN = DVIEW(KRGT) - DVIEW(KLFT) |
| 57 |
DYALEN = DVIEW(KTOP) - DVIEW(KBOT) |
| 58 |
|
| 59 |
LDUM = PLTSTG1 (KXORIG, DXAST) |
| 60 |
LDUM = PLTSTG1 (KYORIG, DYAST) |
| 61 |
LDUM = PLTSTG1 (KXLENG, DXALEN) |
| 62 |
LDUM = PLTSTG1 (KYLENG, DYALEN) |
| 63 |
|
| 64 |
C --Set axis minimum and maximum and tick intervals (and exponents and |
| 65 |
C --numbering size) |
| 66 |
|
| 67 |
TXATIC = WXATIC |
| 68 |
TYATIC = WYATIC |
| 69 |
CALL GRAPAR (XYSAME, WVIEW, DVIEW, |
| 70 |
& WXALAB, WYALAB, WXAEND, WYAEND, TXATIC, TYATIC) |
| 71 |
|
| 72 |
BUF(1) = 4 |
| 73 |
BUF(2) = WVIEW(KLFT) |
| 74 |
BUF(3) = WXALAB |
| 75 |
BUF(4) = WVIEW(KRGT) |
| 76 |
BUF(5) = TXATIC |
| 77 |
BUF(6) = 0.0 |
| 78 |
BUF(7) = WVIEW(KBOT) |
| 79 |
BUF(8) = WYALAB |
| 80 |
BUF(9) = WVIEW(KTOP) |
| 81 |
BUF(10)= TYATIC |
| 82 |
BUF(11)= 0.0 |
| 83 |
LDUM = PLTSTG (KSCALE, BUF) |
| 84 |
|
| 85 |
C --Draw the axes |
| 86 |
|
| 87 |
CALL PLTGPH (0., 0., 0, TXLAB, ' ', TYLAB, ' ') |
| 88 |
|
| 89 |
RETURN |
| 90 |
END |