TuneYAutoRange — Adjust tuning parameters for Y axis range calculation

$plot->TuneYAutoRange([], [`$zero_magnet`

], [`$adjust_mode`

])`$adjust_amount`

`TuneYAutoRange`

is used to adjust the parameters used by
PHPlot when automatically calculating the plot range along the Y axis.

`$zero_magnet`

Optional value for the Y axis

*zero magnet*, which controls how far PHPlot will extend the plot range to include 0 if it doesn't already include 0. This is a floating point value between 0 and 1 inclusive, where 0 disables the zero magnet, and 1 requires the range be always extended to include 0. See Section 4.6.4.1, “Range parameter: zero_magnet” for more information.`$adjust_mode`

Optional value for the Y axis range extension mode, which determines the method PHPlot uses to extend the end of the plot range beyond the data range. This is a single character:

Mode Description T Tick : extend the range, then to the next tick mark. R Range : extend the range. I Integer : extend the range, then to the next integer value. See Section 4.6.4.2, “Range parameter: adjust_mode” for more information.

`$adjust_amount`

Optional value for the Y axis range extension amount. This is a factor of the overall range by which the range is extended to leave extra room for labels, plot markers, etc. See the Section 4.6.4.3, “Range parameter: adjust_amount” for more information.

Specifying `NULL`

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

PHPlot does not calculate or adjust ends of the plot range which are set with SetPlotAreaWorld. PHPlot also does not adjust the plot range for the Y axis in the case where Y values are implied, rather than specified, in the data array (data type text-data-yx, used with horizontal plots).

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

See Section 4.6.3, “Automatic Range Calculation” for more information on the range calculations and parameters.

The default for the zero magnet is 6/7, which results in up to 600% range
extension.
The default adjustment mode is `T`

, which forces the axis
to end at a tick mark.
The default adjustment amount is either 0% or 3% (0.03), depending on the
plot type and whether Y is the independent or dependent variable.

If you want a plot with 'zero suppression' (not including zero on the Y axis), you can disable the zero magnet as follows:

$plot->TuneYAutoRange(0);

This emphasizes small changes in large numbers.

If you want PHPlot to set the plot range to exactly the data range, with no extensions or adjustments, set the zero magnet to 0 to disable it, select adjustment mode 'R' (range only), and set the adjustment amount to 0%. Your Y axis will go from the smallest to the largest Y value in your data array, with no extra space on either side.

$plot->TuneYAutoRange(0, 'R', 0);

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.