SetLegendPixels
Prev | PHPlot Function Reference | Next

## SetLegendPixels

SetLegendPixels — Position the legend on the image (device coordinates)

## Synopsis

    $plot->SetLegendPixels([$x, $y])

## Description

`SetLegendPixels` lets you position the legend on the image, using device coordinates, rather than letting PHPlot position it for you.

## Parameters

`$x`, `$y`

  Absolute device coordinates of the upper left corner of the legend box. The units are pixels and the origin is in the upper left corner of the image. If the values are omitted or NULL, the default behavior is restored.

## Notes

The default behavior is for PHPlot to position the legend in the upper right corner of the plot area.

See SetLegendPosition for more flexible legend positioning options. `SetLegendPixels($x, $y)` is equivalent to `SetLegendPosition(0, 0, 'image', 0, 0, $x, $y)`. This places the top left corner of the legend at the top left corner of the image, offset by ($x, $y) pixels.

See also SetLegendWorld.

## History

Through PHPlot-5.3.0, the arguments were required. To restore the default behavior, it was necessary to use `SetLegendPixels(NULL, NULL)`. Starting with PHPlot-5.3.1, the arguments may be omitted to restore the default behavior.

Prev | Up | Next
SetLegendColorboxBorders | Home | SetLegendPosition