GINO Graphics Suite - GINOGRAF v9.5  

ggBlockFillMultiHistogram

Syntax

[C/C++:]
void ggBlockFillMultiHistogram(int type, float *rdata, int ndim1, int ncols, int ndata,float frac, float gap, int line[], int is1, int is2);
[F90:]
subroutine ggBlockFillMultiHistogram(type, rdata, ndim1, ncols, ndata, frac, gap, line, is1, is2)

integer, intent(in) :: type,ndim1,ncols,ndata
real, intent(in) :: rdata(ndim1,*), frac,gap
integer, intent(in) :: line(*),is1,is2

Arguments

type
Type of multi-histogram chart

= GSTACKED Data sets stacked in single column
= GCLUSTERED Data sets displayed as multiple columns

rdata
Two dimensional array giving the heights of the columns in each of the data sets

ndim1
The primary dimension of the data array rdata

ncols
The number of compound columns, or clusters of columns to be drawn. This can be from 1 to ndim1

ndata
The number of data sets for each column or column cluster to be drawn. This can be from 1 to the second dimension of the data array rdata

frac
Fraction of an interval to be filled for each column or column cluster

gap
Size of gap between members of the cluster, as a fraction of the width of a single member of the cluster. Range 0.0 to 1.0 (only used for type GCLUSTERED)

line
Integer array, of dimension ndata, determining the line style to be used to fill each data set. The corresponding component of each column will be drawn with the same line style

= GCURRENT Specifies the current line style
= 1 to 256 Specifies the line style index
>256 Specifies the current line style

is1
The start position in the first dimension of the data array to be used as the first item (category) on the discrete axis

is2
The start position in the second dimension of the data array to be used as the first component on the continuous axis (or first column of cluster)

Description

The routine ggBlockFillMultiHistogram() block fills the columns of a multi-data set Histogram with respect to the current axes as set up by ggSetAxesPos() and ggSetAxesScaling(). If a discrete axis has not been defined using ggSetAxesScaling(), 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 routine is designed to display a stacked or clustered histogram representing a block of data from an arbitrarily sized two dimensional array - rdata. Where ndim1 is the primary dimension of the array and is1 and is2 specify the starting offset of the required data block. The dimensions of the data being represented is ncols by ndata, where ncols is the number of data items in each set and ndata is the number of data sets.

In C the array rdata should be declared: float rdata[][ndim1];

In Fortran 90 the array rdata should be declared: real rdata(ndim1,*)

The width of each stacked or clustered column = ((length of the discrete axis)/ncols) * frac where a frac = 0.99 will cause either the stacked or clustered column to nearly touch the adjacent column. Values of frac outside the range 0.0 to 1.0 are clipped to 0.1 and 0.9 respectively with values between 0.5 and 0.9 giving the most satisfactory results. Unlike the single data set histogram plot, the width of each column includes any extrusions due to the current block chart filling attributes, thus reducing the width of the front face of the column. This is required to ensure that each stacked or clustered column does not overlap with an adjacent column.

All the columns of each data set [i] are solid filled in the line style specified by line[i] whereas the colour, depth and angle of the extrusions are determined by the current block fill settings as set by ggSetBlockChartAttribs(). The outline of each column is drawn in the current GINO line style.

See Also

ggBlockFillMultiHistogram Usage
ggBlockFillHistogram
ggSetBlockChartAttribs