LEGEND(string1,string2,string3, ...) puts a legend on the current plot
using the specified strings as labels. LEGEND works on line graphs,
bar graphs, pie graphs, ribbon plots, etc.
Y
ou can label any
solid-colored patch or surface object.
The fontsize and fontname for
the legend strings matches the axes fontsize and fontname.
LEGEND(H,string1,string2,string3, ...) puts a legend on the plot
containing the handles in the vector H using the specified strings as
labels for the corresponding handles.
LEGEND(M), where M is a string matrix or cell array of strings, and
LEGEND(H,M) where H is a vector of handles to lines and patches also
works.
LEGEND(AX,...) puts a legend on the axes with handle AX.
LEGEND OFF removes the legend from the current axes and deletes
the legend handle.
LEGEND(AX,'off') removes the legend from the axis AX.
LEGEND TOGGLE toggles legend on or off.
If no legend exists for the
current axes one is created using default strings. The default
string for an object is the value of the DisplayName property
if it is non-empty and otherwise it is a string of the form
'data1','data2', etc.
LEGEND(AX,'toggle') toggles legend for axes AX
LEGEND HIDE makes legend invisible.
LEGEND(AX,'hide') makes legend on axes AX invisible.
LEGEND SHOW makes legend visible. If no legend exists for the
current axes one is created using default strings.
LEGEND(AX,'show') makes legend on axes AX visible.
LEGEND BOXOFF
makes legend background box invisible when legend is
visible.
LEGEND(AX,'boxoff') for axes AX makes legend background box invisible when
legend is visible.
LEGEND BOXON makes legend background box visible when legend is visible.
LEGEND(AX,'boxon') for axes AX making legend background box visible when
legend is visible.
LEGH = LEGEND returns the handle to legend on the current axes or
empty if none exists.