SetPrecisionX

SetPrecisionX — Set precision for numeric formated X labels

Synopsis

$plot->SetPrecisionX($prec)

Description

SetPrecisionX sets the desired numeric precision for X tick and data labels, and also enables 'data' mode formatting of those labels with SetXLabelType.

Note

This function is retained for compatibility, but use of SetXLabelType is preferred.

Parameters

$prec

The desired numeric precision. This is the number of decimal positions to output.

Notes

Setting numeric precision with this function automatically enables 'data' mode formatting as if SetXLabelType('data') was called.

The default is to format numbers with 1 decimal position, but only if 'data' mode formatting is selected.

This function applies to both X tick labels and X data labels. (X data labels are axis data labels for vertical plots, or data value labels within the plot area for horizontal plots. See Section 3.6, “Labels” for more on labels.) Using 'data' format for X axis data labels only makes sense when your data array contains numeric data in the label position.

See SetPrecisionY for Y tick and data labels.

History

Starting with PHPlot-5.0.6, using SetPrecisionX($n) is exactly the same as calling SetXLabelType('data', $n).

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.