SetXTickLabelPos — Position the X tick labels
$plot->SetXTickLabelPos($xtlp
)
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.
$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 |
The default position for the X tick labels is below the plot. However, PHPlot will disable X tick labels by default if X data labels are positioned with 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.
This applies only to tick labels. For data labels, see SetXDataLabelPos. You probably want the tick marks to be in the same positions as the tick labels. To position the tick marks, see SetXTickPos.
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.