TuneYAutoTicks — Adjust tuning parameters for Y axis tick increment calculation


$plot->TuneYAutoTicks([$min_ticks], [$tick_mode], [$tick_inc_integer])


TuneYAutoTicks is used to adjust the parameters used by PHPlot when automatically calculating the tick increment along the Y axis.



Sets the minimum number of tick intervals along the Y axis. This is an integer greater than zero. See Section, “Tick Increment parameter: min_ticks” for more information.


Selects from one of three available modes for calculating the tick increment along the Y axis:

decimalUse a power of 10 times 1, 2, or 5
binaryUse a power of 2
dateUse a date/time value

See Section, “Tick Increment parameter: tick_mode” for more information.


If TRUE, forces PHPlot to pick a whole number (integer) tick increment. If FALSE, allows fractional tick increments. See the Section, “Tick Increment parameter: tick_inc_integer” for more information.


Specifying NULL, or omitting trailing unused parameters, results in no change to that parameter.

If the tick increment is set with SetYTickIncrement or indirectly with SetNumYTicks, then PHPlot does not need to calculate the tick increment, and the parameters set with TuneYAutoTicks are not used.

This applies to the Y axis only, where Y is the dependent variable for vertical plots, and the independent variable for horizontal plots. See also TuneXAutoTicks.

See Section 4.6.7, “Automatic Tick Increment Calculation” for more information on the tick increment calculations and parameters.

The default for min_ticks is 8. The maximum number of tick intervals is about 2.5 times the minimum number.

The default for tick_mode depends on the label formatting type along the Y axis. If SetYLabelType('time') is used to select date/time formatting of labels, then the default for tick_mode is 'date', otherwise it is 'decimal'.

The default for tick_inc_integer is FALSE, meaning PHPlot may use fractional tick increments. (Note this does not mean a tick increment such as 2.5 would ever be selected. PHPlot uses whole numbers above 1 and fractional increments between 0 and 1.)


Use a minimum of 9 tick intervals along the Y axis, and pick a power of 2 as a tick increment:

$plot->TuneYAutoRange(9, 'binary');


This function was added in PHPlot-6.0.0.

SourceForge.net Logo

This version of the manual was produced for the PHPlot Sourceforge project web service site, which requires the logo on each page.

To download a logo-free copy of the manual, see the PHPlot project downloads area.