Syntax
[C/C++:]
void ggSetAxesAnnotation(int ndp, int npower, int asty, int xory);
[F90:]
subroutine ggSetAxesAnnotation(ndp, npower, asty, xory)
integer, intent(in) :: ndp, npower, asty, xory
Arguments
ndp
The number of decimal places
< 0, 
ndp decimal places are always displayed
> 0,  Up to
ndp decimal places are displayed
= 0,  No decimal places are used forcing rounding to the nearest integer value
ndp must be in the range -9 to 9
npower
The power to which annotation is raised, e.g. x10npower.
npower must be in the range -15 to 15, any value outside this range will result in default annotation
For Log axes where NPOWER>0, annotation is output in the form 10n above 10npower and it is output as actual values below 10npower.  A special case of npower=-1 exists to output all npower values including 10
0.  If npower=0, the value of npower is output and the Log10 scale factor is output at the end of the axis.  If actual values are output, intermediate tickmark values can also be output, by setting
val accordingly in ggDrawAxes()
asty
Axis scale format
|
= GNOSCALE |
No scale factor is displayed |
|
= GSCALEPOWEROF10 |
Scale factor is displayed as *10n |
|
= GSCALEZEROS |
Scale factor is displayed as '000 or 0.00' |
|
= GSCALEWORD |
Scale factor is displayed in words |
|
= GSCALEPREFIX |
Scale factor is displayed in engineering units |
Scale types GSCALEWORD and GSCALEPREFIX require that
npower is a multiple of 3
xory
Specified axis
|
= GXAXIS |
Parameters set for X axis |
|
= GYAXIS |
Parameters set for Y axis |
Description
The routine ggSetAxesAnnotation() is used to alter the format of all numeric annotation and the style of the scale factor on linear or log graphical axes.
Its main use is with axes annotation format for all the complete graph and chart routines as well as the component axis drawing routines ggDrawAxes(), ggDrawPolarAxes() and ggAddGrid(). The default format is described under ggDrawAxes().
ndp can be used to optionally control or force the display of the number of decimal places if there are more or less than two decimal places. When
ndp is positive, the axis annotation will only contain up to that number of decimal places as required by the calculated increment.
NB.  Certain machines may not have the capability to cope with numbers to an accuracy of nine decimal places. This may produce undesirable results.
npower is used to control the scale factor of the annotation forcing it to a particular value in the range -15 to 15. If
npower is outside this range, GINOGRAF will display the actual power factor of the data supplied.
asty provides the five alternatives in the display of the scale factor at the end of the axis. If set to GNOSCALE, NO scale factor is displayed at the end of the axes. Obviously, this should be used with care as the values displayed at the tick marks could be misleading and require a scale factor. Type GSCALEPOWEROF10 is the default, displaying the power factor. Type GSCALEZEROS will display the scale factor with the required number of 0's, for example:
x104 is displayed as '0000
x10-3 is displayed as 0.00'
Types GSCALEWORD and GSCALEPREFIX are used when
npower is a multiple of 3 displaying the following words:
 |
If npower is not a multiple of 3, for type GSCALEWORD or GSCALEPREFIX, the default scale type will be used and a warning message output. If the power factor is outside the range -15 to 15 or if ggSetAxesAnnotation() has not been called, GINOGRAF will select an appropriate scale factor which is zero or a multiple of 3.
ggSetAxesAnnotation() is also used to control numerical annotation on Value Charts, Pie Charts and Text Charts. Value charts use the format of the relevant axis, but Pie Charts and Text Charts use the attributes set for the Y axis (xory = GYAXIS) so that values can be matched to those displayed on the Y axis if necessary. The user should note however, that these routines do not provide a means for displaying the scale factor and so in most cases the value of npower should be zero unless a direct relationship can be made with a Y axis and its scale factor.
All the annotation attributes are set to their respective defaults if the routine ggRestoreAxesSettings() is called.
See Also
ggSetAxesAnnotation UsageggDrawAxesggRestoreAxesSettingsggEnqAxesAnnotationggDrawPolarAxesggAddGrid