SetTextColor

SetTextColor — Set general text color

Synopsis

$plot->SetTextColor($color)

Description

SetTextColor sets the color which is used for legend text, and the default color used for tick labels and data labels.

Parameters

$color

Color value to use. See Section 3.5, “Colors” for more on color values.

Notes

The default text color is black.

Starting with PHPlot-5.7.0, there are more specific functions to set the color for labels: SetDataLabelColor, SetDataValueLabelColor, and SetTickLabelColor. All of these elements default to using the color set with SetTextColor.

Example

Legend text and data labels will be blue, and tick labels will be red. Note that the functions may be used in any order, with the same results.

$plot->SetTextColor('blue');
$plot->SetTickLabelColor('red');