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.

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 applies to both X data labels and X tick labels (only one of which should be enabled). Using 'data' format for X data labels only makes sense when your data array contains numeric data in the label position.