1HSTOPI(3NCARG) NCAR GRAPHICS HSTOPI(3NCARG)
2
3
4
6 HSTOPI - Specifies various INTEGER parameters to be used by the
7 Histogram utility.
8
10 CALL HSTOPI (STRING, PARAM1, PARAM2, ICOL, LCOL)
11
13 #include <ncarg/ncargC.h>
14
15 void c_hstopi (char *string, int param1, int param2,
16 int *icol, int lcol)
17
19 STRING Character, input -- Selects an internal parameter. The
20 possibilities are:
21
22 ´COL=ON´ or ´COL=OFF´
23 ´CLA=ON´ or ´CLA=OFF´
24
25 If an option is turned ´ON´, then the remaining HSTOPI
26 arguments can be used to override the default settings of
27 that option.
28
29 If the option is ´OFF´, then the remaining arguments of the
30 HSTOPI call can be any dummy values. Option settings will
31 be returned to their default values.
32
33 The following options are defined by this subroutine:
34
35 COL This option turns the use of color OFF, or ON.
36 If it is ON, then eight color indices are
37 assigned to the various parts of the histogram
38 as described by the INTEGER array ICOL.
39 Arguments ICOL and LCOL must be set, PARAM1 and
40 PARAM2 can have dummy values.
41
42 CLA This option allows the size and orientation of
43 class labels to be altered. If ´CLA=ON´, the
44 size of the label characters is set using
45 argument PARAM1, and the orientation is set by
46 argument PARAM2. Arguments ICOL and LCOL can
47 have dummy values. If ´CLA=OFF´, defaults are
48 used which cause medium sized characters to be
49 written in the horizontal direction.
50
51 PARAM1 Integer, input -- Specifies the character height of class
52 labels.
53
54 When ´CLA=ON´; 1 = small, 2 = medium, 3 = large; default is
55 2 when ´CLA=OFF´.
56
57 PARAM2 Integer, input -- Specifies the character orientation of
58 class labels.
59
60 If ´CLA=ON´, labels can vary from 0 (horizontal) to 90
61 (vertical) degrees. Vertical is the default when
62 ´CLA=OFF´.
63
64 ICOL Integer, input -- Assigns a set of RGB color indices to the
65 eight components of a histogram graphic when ´COL=ON´.
66
67 ICOL(1) = color index used for area fill of
68 histogram bars of dataset 1.
69 ICOL(2) = color index used for area fill of
70 histogram bars of dataset 2.
71 (When two datasets are compared
72 using parameter IFLAG = 3).
73 ICOL(3) = color index used for bar outlines.
74 ICOL(4) = color index used for drawing axes.
75 ICOL(5) = color index used for drawing a median
76 line.
77 ICOL(6) = color index used for text output
78 (labels.)
79 ICOL(7) = color index used for titles.
80 ICOL(8) = color index used for drawing the
81 perimeter box.
82
83 The default color index is 1 for all (when ´COL=OFF´).
84
85 If ´COL=ON´, the color indices and their associated colors
86 are as follows. (These may be changed by specifying an RGB
87 color table prior to your call to HSTOPI. See the man page
88 for GKS routine gscr.)
89
90 Color Index Color
91
92 0 BLACK
93 1 WHITE
94 2 RED
95 3 GREEN
96 4 BLUE
97 5 CYAN
98 6 MAGENTA
99 7 YELLOW
100 8 ORANGE
101
102 LCOL Integer, input -- Specifies the length of array ICOL. LCOL
103 must be set to 8.
104
106 The C-binding argument descriptions are the same as the FORTRAN
107 argument descriptions.
108
110 HSTOPI is called to set parameters of type INTEGER before entry HISTGR
111 is called to generate the histogram. Options are size and orientation
112 of class labels, and setting the colors for various components of the
113 graphic.
114
115 For a complete list of parameters available in this utility, see the
116 histogram_params man page.
117
119 Use the command "ncargex thstgr" to generate a three frame example of
120 histogram options. The following code causes the second frame to have
121 an array of colors assigned to the graphic components (argument ICOL.)
122
123 REAL RGB(3,15)
124 INTEGER COLORS(15)
125 C
126 C Define the RGB triples of 15 colors in a data statement.
127 C (Code omitted for brevity. See the data statement in thstgr.f)
128 C
129 C Assign colors to the color indices.
130 C
131 DO 100 I = 1,15
132 CALL GSCR(1,I,RGB(1,I),RGB(2,I),RGB(3,I))
133 100 CONTINUE
134 C
135 C Assign color indices to the 8 components of the graphic.
136 C
137 COLORS(1) = 8
138 COLORS(2) = 3
139 COLORS(3) = 14
140 COLORS(4) = 11
141 COLORS(5) = 6
142 COLORS(6) = 13
143 COLORS(7) = 14
144 COLORS(8) = 5
145 CALL HSTOPI(´COL=ON´,3,0,COLORS,8)
146
147 Example "ncargex thstmv" shows three examples of histograms with
148 missing values in the input data.
149
151 To use HSTOPI or c_hstopi, load the NCAR Graphics libraries ncarg,
152 ncarg_gks, and ncarg_c, preferably in that order.
153
155 See the histogram man page for a description of all Histogram error
156 messages and/or informational messages.
157
159 Online: histogram, histogram_params, histgr, hstopc, hstopl, hstopr,
160 ncarg_cbind
161
162 Hardcopy: NCAR Graphics Fundamentals, UNIX Version
163
165 Copyright (C) 1987-2009
166 University Corporation for Atmospheric Research
167 The use of this Software is governed by a License Agreement.
168
169
170
171UNIX March 1993 HSTOPI(3NCARG)