SetLegendBgColor
Prev | PHPlot Function Reference | Next

## 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.

Prev | Up | Next
SetLegend | Home | SetLegendColorboxBorders