SetXDataLabelPos
Prev | PHPlot Function Reference | Next

## SetXDataLabelPos

SetXDataLabelPos — Where to draw the X data labels

## Synopsis

    $plot->SetXDataLabelPos($xdlp)

## Description

`SetXDataLabelPos` determines where the X data labels are drawn. The labels can be drawn at the bottom of the plot (below the X axis), above the plot, in both positions, or neither.

## Parameters

`$xdlp`

  A string indicating the desired position for the X data labels:

  Position | Description
  --- | ---
  plotdown | Data labels below the plot
  plotup | Data labels above the plot
  both | Data labels both below and above the plot
  none | No data labels

## Notes

The default position for X data labels is below the plot. However PHPlot only enables the data labels if SetXDataLabelPos was used to position them, or if SetXTickLabelPos was not used to enable the tick labels and the data labels are non-empty.

This applies only to data labels. For tick labels, see SetXTickLabelPos.

If X data lines are enabled with SetDrawXDataLabelLines, then SetXDataLabelPos() also determines the direction of the lines which are drawn from the data points.

## History

Through PHPlot-5.0.7, the default position for X data labels was below the plot ('plotdown'). This would result in overlaid data and tick labels by default. In addition, positioning the X tick labels with SetXTickLabelPos with a position other than 'none' resulted in disabling the X data labels, and vice-versa. If both tick and data labels were positioned, the later setting overrode the earlier, which was turned off. Starting with PHPlot-5.1.0, PHPlot handles tick and data label positions as described in the notes above.

Prev | Up | Next
SetXDataLabelAngle | Home | SetXDataLabelType