SetNumXTicks

SetNumXTicks — Set the number of X tick marks

Synopsis

$plot->SetNumXTicks([$nt])

Description

SetNumXTicks sets the number of tick marks to draw on the X axis. You can use either this function or SetXTickIncrement (but not both) to control the tick mark spacing.

Parameters

$nt

Integer number of tick marks to draw. If the value is omitted or an empty string, the default behavior is restored.

Notes

SetNumXTicks actually sets the number of intervals into which PHPlot divides the X data range. If there are N intervals, there might be as many as N+1 tick marks (accounting for one at each end). Or, there might be N or N-1 tick marks, if a tick anchor is set with SetXTickAnchor, or if PHPlot is told to omit tick marks from either end with SetSkipLeftTick or SetSkipRightTick.

If neither SetNumXTicks nor SetXTickIncrement is used, the tick mark interval is calculated as 1/10th of the X data range.

History

Through PHPlot-5.3.0, the argument was required. To restore the default behavior, it was necessary to use SetNumXTicks(''). Starting with PHPlot-5.3.1, the argument may be omitted to restore the default behavior.