GINO Graphics Suite - GINOGRAF v9.5  

ggSetColourScale

Syntax

[C/C++:]
void ggSetColourScale(int ncol, GHLSSTY *cstart, GHLSSTY *cfinish, float rmin, float rmax, int xory);
[F90:]
subroutine ggSetColourScale(ncol, cstart, cfinish, rmin, rmax, xory)

integer, intent(in ) :: ncol, xory
type (GHLSSTY), intent(in ) :: cstart, cfinish
real, intent(in ) ::  rmin, rmax

Arguments

ncol
Number of divisions in colour scale

= GOFF Switches colour scaling off

cstart
Starting colour setting

cfinish
Finish colour setting

rmin
Starting graph value

rmax
Finish graph value

xory
Flag determining which axis the colour scale is to be applied (and displayed)

= GXAXIS X axis
= GYAXIS Y axis

Description

The routine ggSetColourScale() sets a colour scaling to be applied to future drawing of 2D graph components, such that elements at value rmin will be shaded with colour cstart and elements at rmax will be shaded with colour cfinish and correspondingly at all values in between. The colour scaling and graphical values apply to either the X axis (xory=GXAXIS), or the Y axis (xory=GYAXIS) as required.

The value of ncol specifies the number of colour graduations between the colour limts that are used, the larger the number the finer the scale. Setting ncol to GOFF switches off the colour scaling for future graph drawing components reverting to the default condition of drawing them using the current line colour.

Both colour values cstart and cfinish are defined using the GINO structure GHLSSTY with its components of hue, light and saturation. Whilst the limits of these values are 0.0-360.0, 0.0-1.0 and 0.0-1.0 respectively, multiple cycles of hue, lightness or saturation may be defined by setting values outside these limits.  For example, if the range of hue values are set to 0.0 and 720.0, two cycles of the colour spectrum will be used for the graphical range specified.

Where the range of graphical values (rmax-rmin) equals zero, the colour scaling is applied to the current limits of either the X or Y axis according to the setting of xory.

Colour scaling affects all line, curve, symbol, error bars and value elements to a graph including the complete graph drawing routine ggPlotGraph() where a colour scale bar is also added to the top or left axes as appropriate. The colour scale bar may also be drawn using the routine ggDrawColourScale().

See Also

ggSetColourScale Usage
ggAddAkimaCurve
ggAddErrorBars
ggAddGraphCurve
ggAddGraphMarkers
ggAddGraphPolyline
ggAddGraphSpline
ggAddGraphValues
ggDrawColourScale
ggEnqColourScale
ggPlotGraph