SetTextColor

SetTextColor — Set general text color

Synopsis

$plot->SetTextColor($color)

Description

SetTextColor sets the default color which is used for legend text, 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.

Starting with PHPlot-6.0.0, the legend text color can be set with SetLegendTextColor. If that function is not used, then the legend text uses 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');

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.