ncl_hstopi - Man Page
Specifies various INTEGER parameters to be used by the Histogram utility.
Synopsis
CALL HSTOPI (STRING, PARAM1, PARAM2, ICOL, LCOL)
C-Binding Synopsis
#include <ncarg/ncargC.h>
void c_hstopi (char *string, int param1, int param2,
int *icol, int lcol)
Description
- STRING
Character, input -- Selects an internal parameter. The possibilities are:
´COL=ON´ or ´COL=OFF´
´CLA=ON´ or ´CLA=OFF´If an option is turned ´ON´, then the remaining HSTOPI arguments can be used to override the default settings of that option.
If the option is ´OFF´, then the remaining arguments of the HSTOPI call can be any dummy values. Option settings will be returned to their default values.
The following options are defined by this subroutine:
- COL
This option turns the use of color OFF, or ON. If it is ON, then eight color indices are assigned to the various parts of the histogram as described by the INTEGER array ICOL. Arguments ICOL and LCOL must be set, PARAM1 and PARAM2 can have dummy values.
- CLA
This option allows the size and orientation of class labels to be altered. If ´CLA=ON´, the size of the label characters is set using argument PARAM1, and the orientation is set by argument PARAM2. Arguments ICOL and LCOL can have dummy values. If ´CLA=OFF´, defaults are used which cause medium sized characters to be written in the horizontal direction.
- PARAM1
Integer, input -- Specifies the character height of class labels.
When ´CLA=ON´; 1 = small, 2 = medium, 3 = large; default is 2 when ´CLA=OFF´.
- PARAM2
Integer, input -- Specifies the character orientation of class labels.
If ´CLA=ON´, labels can vary from 0 (horizontal) to 90 (vertical) degrees. Vertical is the default when ´CLA=OFF´.
- ICOL
Integer, input -- Assigns a set of RGB color indices to the eight components of a histogram graphic when ´COL=ON´.
ICOL(1) = color index used for area fill of
histogram bars of dataset 1.
ICOL(2) = color index used for area fill of
histogram bars of dataset 2.
(When two datasets are compared
using parameter IFLAG = 3).
ICOL(3) = color index used for bar outlines.
ICOL(4) = color index used for drawing axes.
ICOL(5) = color index used for drawing a median
line.
ICOL(6) = color index used for text output
(labels.)
ICOL(7) = color index used for titles.
ICOL(8) = color index used for drawing the
perimeter box.The default color index is 1 for all (when ´COL=OFF´).
If ´COL=ON´, the color indices and their associated colors are as follows. (These may be changed by specifying an RGB color table prior to your call to HSTOPI. See the man page for GKS routine gscr.)
Color Index Color
0 BLACK
1 WHITE
2 RED
3 GREEN
4 BLUE
5 CYAN
6 MAGENTA
7 YELLOW
8 ORANGE- LCOL
Integer, input -- Specifies the length of array ICOL. LCOL must be set to 8.
C-Binding Description
The C-binding argument descriptions are the same as the FORTRAN argument descriptions.
Usage
HSTOPI is called to set parameters of type INTEGER before entry HISTGR is called to generate the histogram. Options are size and orientation of class labels, and setting the colors for various components of the graphic.
For a complete list of parameters available in this utility, see the histogram_params man page.
Examples
Use the command "ncargex thstgr" to generate a three frame example of histogram options. The following code causes the second frame to have an array of colors assigned to the graphic components (argument ICOL.)
REAL RGB(3,15) INTEGER COLORS(15) C C Define the RGB triples of 15 colors in a data statement. C (Code omitted for brevity. See the data statement in thstgr.f) C C Assign colors to the color indices. C DO 100 I = 1,15 CALL GSCR(1,I,RGB(1,I),RGB(2,I),RGB(3,I)) 100 CONTINUE C C Assign color indices to the 8 components of the graphic. C COLORS(1) = 8 COLORS(2) = 3 COLORS(3) = 14 COLORS(4) = 11 COLORS(5) = 6 COLORS(6) = 13 COLORS(7) = 14 COLORS(8) = 5 CALL HSTOPI(´COL=ON´,3,0,COLORS,8)
Example "ncargex thstmv" shows three examples of histograms with missing values in the input data.
Access
To use HSTOPI or c_hstopi, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order.
Messages
See the histogram man page for a description of all Histogram error messages and/or informational messages.
See Also
Online: histogram, histogram_params, histgr, hstopc, hstopl, hstopr, ncarg_cbind
Hardcopy: NCAR Graphics Fundamentals, UNIX Version
Copyright
Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.