GINO Graphics Suite - GINOGRAF v9.5  

ggDisplayPercentageColumn

Syntax

[C/C++:]
void ggDisplayPercentageColumn(float x, float y, int nval, float *values, char header[ ]);
[F90:]
subroutine ggDisplayPercentageColumn(x, y, nval, values, header) 

real, intent(in) :: x, y, values(*)
integer, intent(in) :: nval
character*(*), intent(in) :: header

Arguments

x
X coordinate of the top left hand corner of the column in the current units (default units are millimetres)

y
Y coordinate of the top left hand corner of the column in the current units

nval
The number of values to be output in the column

values
Array of length nval containing the original values from which the percentages are calculated

header
Column header

Description

The routine ggDisplayPercentageColumn() generates a set of percentage values and outputs them in an optionally headed column with its top left corner positioned at x,y in user space coordinates. The column is divided into nval or nval+1 cells (depending on the header switch) into which the generated values are placed according to the current Text Chart justification as set by ggSetTextChartAttribs(). A column frame is also drawn using the Text Chart frame colour index also set by ggSetTextChartAttribs().

nval numbers are generated as percentages of the total of all the values held in the array values. The values are output, using the current GINO text and line attributes, in the format of the current Y axis annotation as set by ggSetAxesAnnotation(). The values are followed by a '%' sign. If the total is zero, an error message is output and no values are displayed.

The string header is output in an additional header cell if headers are switched on in the previous call to ggSetTextChartAttribs(). If displayed, the string is output centrally in the cell using the current GINO text and line attributes.

See Also

ggDisplayPercentageColumn Usage
ggSetAxesAnnotation
ggSetTextChartAttribs