GINO Graphics Suite - GINOGRAF v9.5  

ggSetAxesAttribs

Syntax

[C/C++:]
void ggSetAxesAttribs(int swi, float xy, int nstart, int nskip, float aoff, float angstr, int jstmb, int jslcr, int reduc, int xory);
[F90:]
subroutine ggSetAxesAttribs(swi, xy, nstart, nskip, aoff, angstr, jstmb, jslcr, reduc, xory)

integer, intent(in) :: swi, nstart, nskip, jstmb, jslcr, reduc, xory
real, intent(in) :: xy,  aoff, angstr

Arguments

swi
Annotation position

= GONAXIS On specified axis
= GOFFSET Positioned at xy

xy
The position in user space coordinates of the annotation in either the X or Y direction. xy is only used if swi=GOFFSET

nstart
Tick mark number at which the annotation starts

nskip
Number of annotation elements to be skipped during annotation

< 0 Automatic skip generation
= GNONE No labels skipped - all annotation elements are output
> 0 Skip nskip elements

aoff
Offset as a proportion of distance between major tick marks on the specified axis

angstr
Annotation string angle

jstmb
Vertical justification for each annotation element

= GBOTTOM Bottom justified - string above control point
= GMIDDLE Middle justified - string centred at control point
= GTOP Top justified - string below control point
= GDEFAULTPOSITION Default for requested axis

jslcr
Horizontal justification for each annotation element

= GLEFT Left justified
= GCENTRE Centre justified
= GRIGHT Right justified
= GDEFAULTPOSITION Default for requested axis

reduc
Annotation character size reduction switch

= GNOREDUCE No size reduction
= GREDUCE Reduce annotation so that no elements overlap (only operates when nskip = GNONE)
xory
Specified axis

= GXAXIS Parameters set for X axis
= GYAXIS Parameters set for Y axis

Description

The routine ggSetAxesAttribs() sets general characteristics for text and numerical axis annotation produced by all the complete graph and chart routines as well as the component axis drawing routines ggDrawAxes(), ggDrawAxesLabels(), ggDrawPolarAxes() and ggAddGrid().

The arguments nstart and nskip determine the first major tick mark to be annotated and whether any elements are to be skipped. If nskip < 0, elements are automatically skipped if there is not enough space between tick marks to output the requested elements.

The annotation is output with respect to a control point which is positioned in line with each major tick mark to the specified axis. Where the annotation is output 'on' the axis (swi=0), the control point is twice the tick mark length away from the axis on either the clockwise or anti-clockwise side. (The side being determined by the relevant parameter in the output routine ggAddGrid(), ggDrawAxes() or ggDrawAxesLabels()). Where the annotation is output at xy the control point is on the specified line.

The control point can then be shifted using the offset factor aoff which is measured as a proportion of the distance between the major tick marks on the relevant axis. The annotation elements may be rotated by angstr about the control point and justified in both vertical and horizontal directions using jstmb and jslcr. The justification is performed with respect to the angle that the annotation is output.

When all annotation elements are being output (nskip=GNONE) and their bounding boxes overlap then the character size may be reduced by setting reduc to GREDUCE. The character size of the annotation along the whole axis is reduced in height and width in order to retain the current aspect ratio.

All the axes attributes for both axes are set to their respective defaults if the routine ggRestoreAxesSettings() is called.

When drawing intermediate tickmark values on log axes, these values are processed separately to the major tickmark values, therefore, setting nskip and/or reduc will result in intermediate values being skipped independently to the major values and possibly with an independent reduction in character size.

See Also

ggSetAxesAttribs Usage
ggDrawAxes
ggRestoreAxesSettings
ggDrawAxesLabels
ggEnqAxesAttribs
ggDrawPolarAxes
ggAddGrid