TuneYAutoTicks
Prev | PHPlot Function Reference | Next

## TuneYAutoTicks

TuneYAutoTicks — Adjust tuning parameters for Y axis tick increment calculation

## Synopsis

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

## Description

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

## Parameters

`$min_ticks`

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

`$tick_mode`

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

  Mode | Description
  --- | ---
  decimal | Use a power of 10 times 1, 2, or 5
  binary | Use a power of 2
  date | Use a date/time value

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

`$tick_inc_integer`

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

## Notes

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.)

## Example

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');

## History

This function was added in PHPlot-6.0.0.

Prev | Up | Next
TuneXAutoTicks | Home | Part III. Developer's Guide to PHPlot