Axis labelling and divisions optimisation


By default, labels used by the command AXIS and PIE are numeric labels. The command LABELS, allows the user to define up to 9 alphanumeric set of labels (numbered from 1 to 9). These labels can then be used in subsequent commands using PIE or AXIS primitives of HIGZ.

The LABELS command has three parameters:

The label sets thus defined can be used for axes on all plots produced by PAW (HPLOT histograms, graphs, vectors drawing, etc.) via the SET NDVX (NDVY) command. These commands have the following structure:
     SET NDVX i            e.g. SET NDVX 512
 
or
     SET NDVX i.jk         e.g. SET NDVX 10.25
 
In the first case the number ``i'' contains 100 times the number of secondary divisions plus the number of primary divisions. (e.g. 512 means 12 primary and 5 secondary division. By adding 10000 times N3 to ``i'' a third level of divisions is available.

In the second case the number in front of the dot (i) indicates the total number of divisions, the first digit following the dot (j) the label identifier (LABNUM) (if this number is equal to 0 numeric labels are drawn). The second digit after the dot (k) indicates the position where the labels have to be drawn (i.e. the parameter, in this case 5, indicating horizontally written text centred on the interval). Study the next figures for details. These two figures show that the labels can be centred on the tick marks (1 to 4) or on the divisions (5 to 8). If the labels are centred on the tick marks, note that the number of items in the command LABELS must be equal to the number of tick marks (which is equal to the number of divisions plus one ), otherwise the last alphanumeric label on the axis will be undefined.

By default, the number of primary divisions given by SET NDVX n, SET NDVY n or SET NDVZ n is optimised to have a reasonable labelling: The number of divisions ( NDIV ) is calculated according to the following convention:

                          (NDIV = N1 + 100*N2 + 10000*N3)
 
Where N1 is the number of primary divisions, N2 is the number of second order divisions and N3 is the number of third order divisions. The sign of NDIV is also used to control the labelling:
  1. If NDIV is positive, it is taken as a maximum number and the binning is optimised.
  2. If NDIV is negative, its absolute value is taken as the exact number of division without optimisation.
  3. If NDIV equal zero is given the default (510. i.e. 10 primary divisions and 5 secondary) is taken.

The number of primary divisions is also optimised according the number of zones (see command ZONE) i.e : along the X direction the number of primary divisions is divided by the_number_of_X_zones along the Y direction the number of primary divisions in divided by (the_number_of_Y_zones)/2.

If the number of divisions has to be exactly equal to the number given by SET NDVX n, SET NDVY n or SET NDVZ n, a negative value must be used i.e.:

     SET NDVX -i            e.g. SET NDVX -512
 
or
     SET NDVX -i.jk         e.g. SET NDVX -10.25
 
For example to label each subsequent X-axis with the names of the months of the year centred in the middle of each bin you can use:
 PAW > LABEL 1 12 JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC
 PAW > SET NDVX -12.15
 
Limitation: Alpha numeric labels (defined with the command LABEL) do not work on 3D plots like Lego Plots and Surface Plots.


Release NotesKnown bugsFAQsContributionsTutorialReference manualDown loadMiscellaneous

Paw.Support@cern.ch