SetLegendBgColor

SetLegendBgColor — Set legend background color

Synopsis

$plot->SetLegendBgColor($color)

Description

SetLegendBgColor sets the background color used in the legend.

Parameters

$color

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

Notes

If SetLegendBgColor is not used, the legend background color will be the same as the image background color. The image background color is set with SetBackgroundColor, and defaults to white.

If you position the legend outside the plot area, this function is useful to make it stand out more, by using a color that differs from image background color. Similarly, if your legend is positioned inside the plot area, but you have not changed the plot area background, you can use this function to make the legend stand out with a different background color.

History

This function was added in PHPlot-6.0.0. In earlier releases, the legend background was always drawn using the image background color.

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.