Debian Codegraph @

packages/seacas/applications/blot/grsymb.f

raw
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 GRSYMB (LINTYP, ISYTYP, INDX)
9 C=======================================================================
10
11 C --*** GRSYMB *** (GRPLIB) Set line type and symbol (PLT)
12 C -- Written by Amy Gilkey - revised 02/14/86
13 C --
14 C --GRSYMB must first be called with a negative index to initialize
15 C --the number of colors to be used (including black and white).
16 C --
17 C --GRSYMB sets the line type and symbol for PLTGRH depending on the
18 C --passed index. The line type and symbol are chosen consecutively
19 C --(see LINTYP, ISYTYP), wrapping around if necessary.
20 C --
21 C --Parameters:
22 C -- LINTYP - IN - the line type:
23 C -- 0 = no line
24 C -- -n = vary line type (on INDX)
25 C -- n = line type n
26 C -- ISYTYP - IN - the symbol type:
27 C -- 0 = no symbol
28 C -- -n = vary symbol type (on INDX)
29 C -- n = symbol n
30 C -- INDX - IN - the line type and symbol index
31
32 C --Routines Called:
33 C -- PLTSTG - (PLTLIB) Set graph parameter
34 C -- 6 = (KCOLIN) set line color for PLTGRH lines
35 C -- 44 = (KCOSYM) set symbol color for PLTGRH lines
36 C -- 5 = (KONLIN) set line type for PLTGRH lines
37 C -- 7 = (KONSYM) set symbol for PLTGRH lines
38
39 PARAMETER (KCOLOR=1)
40 PARAMETER (KCOLIN=6, KCOSYM=44, KONLIN=5, KONSYM=7)
41
42 PARAMETER (NUMLIN=6, NUMSYM=6)
43 C --NUMLIN - the number of line types
44 C --NUMSYM - the number of symbols
45
46 INTEGER INDX
47
48 LOGICAL LDUM, PLTSTG
49 INTEGER LSTLIN, LSTSYM
50 SAVE LSTLIN, LSTSYM
51 C --LSTLIN - the last line type set
52 C --LSTSYM - the last symbol set
53
54 DATA LSTLIN, LSTSYM / -999, -999 /
55
56 IF ((LINTYP .LE. -1) .OR. (LINTYP .NE. LSTLIN)) THEN
57 IF (LINTYP .LE. -1) THEN
58 ILIN = MOD (INDX-1, NUMLIN) + 1
59 ELSE
60 ILIN = MIN (LINTYP, NUMLIN)
61 END IF
62 LDUM = PLTSTG (KONLIN,1.0*ILIN)
63 LSTLIN = ILIN
64 END IF
65 IF ((ISYTYP .LE. -1) .OR. (ISYTYP .NE. LSTSYM)) THEN
66 IF (ISYTYP .LE. -1) THEN
67 ISYM = MOD (INDX-1, NUMSYM) + 1
68 ELSE
69 ISYM = MIN (ISYTYP, NUMSYM)
70 END IF
71 LDUM = PLTSTG (KONSYM, 1.0*ISYM)
72 LSTSYM = ISYM
73 END IF
74
75 RETURN
76 END