Macro Language: Legend Commands
setlegend <bool>
Enable or disable the legend (possible values: yes/no).
legendpos <x> <y>
Defines the legend position.
setlegendbg <bool>
Enable or disable legend background (possible values: yes/no).
setlegendhorizontal <bool>
If set draw legend entries horizontal.
legendalign <align>
Defines the alignment of the legend box

legendlength <length>
Defines the length of legend lines.
legendspace <space>
Defines the vertical space between two legend entries.
legendcolor <c> <c> <c> [a]
legendcolor <COLOR>
Defines the color for the legend text. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With a the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.
legendbgcolor <c> <c> <c> [a]
legendbgcolor <COLOR>
Defines the legend background color. Dependent on the color mode the three values are RGB or HSB values from 0.0 to 1.0. The color mode can be set with the command color mode (0=RGB, 1=HSB). With a the alpha value can be defined (default is 1.0). Alternative you can specify the color as hexadecimal string.
legendfont <font> <font size>
Defines the legend font.