GINO Graphics Suite - GINOGRAF v9.5  

ggAddHistogramValues

Syntax

[C/C++:]
void ggAddHistogramValues(int ncols, float *yarray, float frac);
[F90:]
subroutine ggAddHistogramValues(ncols, yarray, frac)

integer, intent(in) :: ncols
real, intent(in) :: yarray(*), frac

Arguments

ncols
The number of columns in the Histogram

yarray
Array, of dimension ncols, giving the heights of all the columns in the Histogram

frac
Fraction of an interval occupied by each column

Description

The routine ggAddHistogramValues() annotates a Histogram with height values defined in array yarray, with respect to the current axes as set up by the last axis definition calls. ggAddHistogramValues() requires one of the axes to be defined as a discrete axis. This can be done by using ggSetAxesScaling() (with scale=GDISCRETE) or through a previous call to ggPlotHistogram(). If no discrete axis has been defined or both axes have been defined as discrete axes, the discrete axis is assumed to be the X axis. Linear scaling is assumed as the default for the Y axis.

The most recent call to ggSetValueAttribs() determines the position of the annotation about each column as well as the angle, justification and offset of the value string. The default is to position the required value at the centre of each column. Where Histogram data values are negative, the position of the control point on the non-discrete axis is placed in the matching position corresponding to the column height but below the zero axis.

The format of the numerical output is determined by the settings for the current non-discrete axis annotation set by the most recent call to ggSetAxesAnnotation(). Prefix and suffix strings defined by the most recent call to ggSetValueTags() are appended to the numerical output.

See Also

ggAddHistogramValues Usage
ggSetAxesAnnotation
ggSetAxesScaling
ggPlotHistogram
ggSetValueAttribs
ggSetValueTags