Alphabetical list Categories
qlegopt Set options for qlegend and friends
Help text:

qlegopt(k1, v1, ...) specifies options for legend rendering.
Options are specified as key, value pairs. Keys are:
     x0 - x position of left edge of legend, in data coordinates
     y0 - y position of middle of top legend element, in data coordinates
     skip - baselineskip (in points) between elements
     height - height (in points) of rendered patches
     width - width (in points) of rendered lines and patches
     indent - space between rendered samples and following text
     color - color for following text
     drop - vertical distance between middle of samples and text baseline
     dx, dy - additional horizontal and vertical displaced, in points
All of sensible defaults, except X0 and Y0, which default to (0, 0).
Legend elements are automatically rendered one below the other starting at Y0.

Example:

qfigure('qlegopt', 3, 3);

qlegopt('x', 2*pi, 'y', 1, 'dx', 10, 'height', 16, 'skip', 20, 'drop', 5);

qfont Helvetica 16

xx=[0:.1:2*pi];

qpen none

qbrush b .5

qbars(xx, cos(xx), .1);

qlegopt('color', 'b');

qplegend('Cosine');

qbrush r .5

qbars(xx, sin(xx), .1);

qlegopt('color', 'r');

qplegend('Sine');

qshrink

QPlot Documentation — (C) Daniel Wagenaar, 2014–2019