Syntax
[C/C++:]
void ggFillHistogram(int ncols, float *yarray, float frac, int *fill, int *line);
[F90:]
subroutine ggFillHistogram(ncols, yarray, frac, fill, line)
integer, intent(in) :: ncols, fill(*), line(*)
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 to be filled for each column
fill
Integer array, of dimension
ncols, 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 |
|
=  GFINELEFTDIAGONAL |
} |
|
=  GFINERIGHTDIAGONAL |
} |
|
=  GFINEHORIZONTALGRID |
} |
|
=  GFINEDIAGONALGRID |
} |
|
=  GFINEHORIZONTALMESH |
} Specifies the hatch |
|
=  GFINEDIAGONALMESH |
} style index |
|
=  GCOARSEHORIZONTAL |
} |
|
=  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
ncols, 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 ggFillHistogram() fills the columns of a Histogram with respect to either the current axes, as set up by ggSetAxesPos() and ggSetAxesScaling(), or the default Histogram axes used by ggPlotHistogram(). 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 area filled for each column has the height defined in the array
yarray and the width = ((length of X axis)/
ncols) *
frac.
If
frac = 1.0, the fill occupies the whole interval. The columns are centred on the tick marks on the discrete axis.
The columns 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 column 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.
The column boundaries are not drawn; if required these can be produced by a call to ggAddHistogramOutline() or the high level routine ggPlotHistogram(). If ggPlotHistogram() and ggFillHistogram() are used together, ggPlotHistogram() should be called first to set up the axis system.
See Also
ggFillHistogram UsageggPlotHistogramggAddHistogramOutlineggAddHistogramValues