GINO Graphics Suite - GINOGRAF v9.5  

ggPlotBarChart

Syntax

[C/C++:]
void ggPlotBarChart(int nbars, GBARCHART *bars, float frac, int scx, int scy, float vbeg, float vend);
[F90:]
subroutine ggPlotBarChart(nbars, bars, frac, scx, scy, vbeg, vend)

type(GBARCHART), intent(in) :: bars(*)
integer, intent(in) :: nbars, scx, scy
real, intent(in) :: frac, vbeg, vend

Arguments

nbars
The number of bars to be plotted

bars
Array of dimension nbars, giving the start and finish values of the bars to be plotted

scx
Set the X axis as the discrete (perpendicular to bars) axis, or the type of scaling on the continuous axis (axis defining bar length)

= GLINEAR Linear scaling on the X axis
= GLOG10 Logarithmic scaling on the X axis
= GDISCRETE The X axis is the discrete axis

scy
Set the Y axis as the discrete (perpendicular to bars) axis, or the type of scaling on the continuous axis (axis defining bar length)

= GLINEAR Linear scaling on the Y axis
= GLOG10 Logarithmic scaling on the Y axis
= GDISCRETE The Y axis is the discrete axis

frac
Fraction of an interval to be occupied by each bar

vbeg
The centre value of the first bar on the discrete (perpendicular to bars) axis

vend
The centre value of the last bar on the discrete (perpendicular to bars) axis

Description

The routine ggPlotBarChart() draws a frame to fit the available drawing area or current window and plots a Bar Chart within it. The bars on the Bar Chart have the width:

( ( length of discrete axis ) / nbars ) * frac.

and have the start and end positions defined in the bars array.  If frac = 1.0, only the necessary lines are drawn, ie, lines common to two bars are omitted. If frac = 0.0, two coincident lines are drawn centred on the tick mark. If frac < 0.0, the default value is 0.0 and if frac > 1.0, the default value is 1.0.

The Bar Chart is automatically scaled and annotated to make maximum use of the drawing area. If vbeg = vend, no numeric annotation is written on the discrete axis. The type of scaling of the continuous axis and the orientation of the discrete axis are defined by the value given in scx & scy.

The default axes annotation may be changed using the routines ggSetAxesAnnotation() and/or ggSetAxesAttribs().

See Also

ggPlotBarChart Usage
ggSetAxesAnnotation
ggSetAxesAttribs
ggFillBarChart
ggAddBarChartOutline
ggAddBarChartValues
ggSetPlotFrame