SetXTickLabelPos
Prev | PHPlot Function Reference | Next

## SetXTickLabelPos

SetXTickLabelPos — Position the X tick labels

## Synopsis

    $plot->SetXTickLabelPos($xtlp)

## Description

`SetXTickLabelPos` determines where (and if) the X tick labels are drawn. The labels can be drawn at the bottom of the plot, above the plot, in both positions, at the X axis (even if it is in the middle of the plot), or not drawn at all.

## Parameters

`$xtlp`

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

  Position | Description
  --- | ---
  plotdown | Tick labels below the plot
  plotup | Tick labels above the plot
  both | Tick labels both below and above the plot
  xaxis | Tick labels at X axis (even if the axis is in the middle of the plot)
  none | No tick labels

## Notes

The default position for the X tick labels is chosen to avoid overlapping tick and data labels. For vertical plots, the X tick labels will default to 'none' if the X data labels have been enabled using SetXDataLabelPos. If neither SetXTickLabelPos nor SetXDataLabelPos are used, PHPlot will enable just data labels if they are non-empty, and otherwise it will enable just tick labels, and position them below the plot. For horizontal plots, there is no conflict (because data labels are drawn along Y), so the tick label position defaults to 'plotdown'.

This applies only to tick labels. For data labels, see SetXDataLabelPos. You may want the tick marks to be in the same position as the tick labels. To position the tick marks, see SetXTickPos.

See SetXAxisPosition for positioning the X axis.

## History

Through PHPlot-5.0.7, the default position for X tick labels was below the plot ('plotdown'). This would result in overlaid data and tick labels by default. In addition, positioning the X data labels with SetXDataLabelPos with a position other than 'none' resulted in disabling the X tick 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
SetXTickIncrement | Home | SetXTickLength