GINO Graphics Suite - GINOGRAF v9.5  

ggFillBarChart

Syntax

[C/C++:]
void ggFillBarChart(int nbars, GBARCHART *bars, float frac, int *fill,
int *line);
[F90:]
subroutine ggFillBarChart(nbars, bars, frac, fill, line)

type(GBARCHART), intent(in) :: bars(*)
integer, intent(in) :: nbars, fill(*), line(*)
real, intent(in) :: frac

Arguments

nbars
The number of bars in the Bar Chart

bars
Array of dimension nbars, giving the start and finish values of all the bars in the Bar Chart

frac
Fraction of an interval to be filled for each bar

fill
Integer array, of dimension nbars, determining the fill styles to be used to fill each column

< -1 Specifies no fill and no boundary
=  GHOLLOW Specifies boundary only
=  GSOLID Specifies a solid fill
=  GFINEHORIZONTAL }
=  GFINEVERTICAL }
=  GFINELEFTDIAGONAL }
=  GFINERIGHTDIAGONAL }
=  GFINEHORIZONTALGRID }
=  GFINEDIAGONALGRID }
=  GFINEHORIZONTALMESH } Specifies the hatch
=  GFINEDIAGONALMESH } style index
=  GCOARSEHORIZONTAL }
=  GCOARSEVERTICAL }
=  GCOARSELEFTDIAGONAL }
=  GCOARSERIGHTDIAGONAL }
=  GCOARSEHORIZONTALGRID }
=  GCOARSEDIAGONALGRID }
=  GCOARSEHORIZONTALMESH }
=  GCOARSEDIAGONALMESH }
>256 Specifies a solid fill for software fill, or the fill style index for hardware fill
line
Integer array, of dimension nbars, determining the line style to be used to fill each column

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

The value of an element of line is irrelevant where the corresponding element of fill has a value less than -1

Description

The routine ggFillBarChart() fills the bars of a Bar Chart, with respect to either the current axes, as set up by ggSetAxesPos() and ggSetAxesScaling(), or the default axes used by ggPlotBarChart(). If a discrete axis has not been defined (using ggSetAxesScaling() with scale=GDISCRETE) 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 area filled for each bar has the start and finish values defined in the components bars.s and bars.f and the width ((length of discrete axis)/nbars) * frac. If frac = 1.0, the fill occupies the whole interval.

The bars are centred on the tick marks on the discrete axis.

The bars are filled in the style determined by the combination of the corresponding elements of fill and line. Where a fill element is equal to GHOLLOW, only the boundary of the bar is drawn. One or more of the segments may be left unfilled by giving the corresponding element(s) of fill a value of -2 or less. Negative values of line cause a warning to be output and the absolute value is used. The default line styles, hatch styles and fill styles appear in Appendix A of this manual (see Defaults). The current line style is left unchanged.

Where the boundaries of the bars are not drawn; if required, these can be produced by a call to ggAddBarChartOutline() or the complete Bar Chart routine ggPlotBarChart(). If ggPlotBarChart() and ggFillBarChart() are used together, ggPlotBarChart() should be called first to set up the axis system.

See Also

ggFillBarChart Usage
ggPlotBarChart
ggAddBarChartOutline
ggAddBarChartValues