| 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 SHOLEG (SHOTYP, XYTYPE, DOQA, DOLEG, DOAXIS, CAPTN, |
| 9 |
* DOBOX) |
| 10 |
C======================================================================= |
| 11 |
|
| 12 |
C --*** SHOLEG *** (BLOT) Display plot labeling option |
| 13 |
C -- Written by Amy Gilkey - revised 04/28/88 |
| 14 |
C -- |
| 15 |
C --SHOLEG display the plot labeling option requested by the option type: |
| 16 |
C -- QA - whether the QA information is to be drawn on legend |
| 17 |
C -- LEGEND - whether the non-QA legend information is to be drawn |
| 18 |
C -- AXIS - whether the axis is to be numbered |
| 19 |
C -- CAPTION - the plot caption |
| 20 |
C -- |
| 21 |
C --Parameters: |
| 22 |
C -- SHOTYP - IN - the show option (see above) |
| 23 |
C -- XYTYPE - IN - true iff current program is an XY curve versus mesh plot |
| 24 |
C -- DOQA - IN - true iff QA information is to be drawn on legend |
| 25 |
C -- DOLEG - IN - true iff non-QA legend information is to be drawn |
| 26 |
C -- DOAXIS - IN - true iff axis is to be labeled |
| 27 |
C -- CAPTN - IN - the three-line plot caption |
| 28 |
C -- DOBOX - IN - true iff plot is to be outlined |
| 29 |
|
| 30 |
C --Routines Called: |
| 31 |
C -- LENSTR - (STRLIB) Find string length |
| 32 |
C -- NUMSTR - (STRLIB) Convert numbers to engineering notation |
| 33 |
C -- SQZSTR - (STRLIB) Delete extra blanks from string |
| 34 |
|
| 35 |
CHARACTER*(*) SHOTYP |
| 36 |
LOGICAL XYTYPE |
| 37 |
LOGICAL DOQA, DOLEG, DOAXIS, DOBOX |
| 38 |
CHARACTER*(*) CAPTN(3) |
| 39 |
|
| 40 |
CHARACTER*20 STR20 |
| 41 |
|
| 42 |
IF (.NOT. XYTYPE) THEN |
| 43 |
STR20 = 'mesh' |
| 44 |
ELSE |
| 45 |
STR20 = 'X-Y curve' |
| 46 |
END IF |
| 47 |
LSTR = LENSTR (STR20) |
| 48 |
|
| 49 |
IF (SHOTYP .EQ. 'QA') THEN |
| 50 |
IF (DOQA) THEN |
| 51 |
WRITE (*, 10000) 'Include QA information on ', |
| 52 |
& STR20(:LSTR), ' plot legend' |
| 53 |
ELSE |
| 54 |
WRITE (*, 10000) 'Omit QA information from ', |
| 55 |
& STR20(:LSTR), ' plot legend' |
| 56 |
END IF |
| 57 |
|
| 58 |
ELSE IF (SHOTYP .EQ. 'LEGEND') THEN |
| 59 |
IF (DOLEG) THEN |
| 60 |
WRITE (*, 10000) 'Include non-QA legend information on ', |
| 61 |
& STR20(:LSTR), ' plot' |
| 62 |
ELSE |
| 63 |
WRITE (*, 10000) 'Omit non-QA legend information on ', |
| 64 |
& STR20(:LSTR), ' plot' |
| 65 |
END IF |
| 66 |
|
| 67 |
ELSE IF (SHOTYP .EQ. 'AXIS') THEN |
| 68 |
IF (DOAXIS) THEN |
| 69 |
WRITE (*, 10000) 'Number ', STR20(:LSTR), ' axes' |
| 70 |
ELSE |
| 71 |
WRITE (*, 10000) 'Do not number ', STR20(:LSTR), ' axes' |
| 72 |
END IF |
| 73 |
|
| 74 |
ELSE IF (SHOTYP .EQ. 'OUTLINE') THEN |
| 75 |
IF (DOBOX) THEN |
| 76 |
WRITE (*, 10000) 'Outline Plot' |
| 77 |
ELSE |
| 78 |
WRITE (*, 10000) 'Do not outline plot' |
| 79 |
END IF |
| 80 |
|
| 81 |
ELSE IF (SHOTYP .EQ. 'CAPTION') THEN |
| 82 |
DO 100 IEND = 3, 1, -1 |
| 83 |
IF (CAPTN(IEND) .NE. ' ') GOTO 110 |
| 84 |
100 CONTINUE |
| 85 |
110 CONTINUE |
| 86 |
IF (STR20 .EQ. 'mesh') STR20 = 'Mesh' |
| 87 |
IF (IEND .LE. 0) THEN |
| 88 |
WRITE (*, 10000) |
| 89 |
& STR20(:LSTR), ' plot caption is not defined' |
| 90 |
ELSE |
| 91 |
WRITE (*, 10000) STR20(:LSTR), ' plot caption:' |
| 92 |
DO 120 I = 1, IEND |
| 93 |
WRITE (*, 10000) ' ', CAPTN(I)(:LENSTR(CAPTN(I))) |
| 94 |
120 CONTINUE |
| 95 |
END IF |
| 96 |
END IF |
| 97 |
|
| 98 |
RETURN |
| 99 |
10000 FORMAT (1X, 5A) |
| 100 |
END |