12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

legendlegend_handle = legend returns the handle to the legend on the current axesor an empty vector if no legend exists.legend with no arguments refreshes all the legends in the current figure.legend(legend_handle) refreshes the specified legend.legend(...,pos) uses pos to determine where to place the legend.• pos = –1 places the legend outside the axes boundary on the right side.• pos = 0 places the legend inside the axes boundary, obscuring as few pointsas possible.• pos = 1 places the legend in the upper-right corner of the axes (default).• pos = 2 places the legend in the upper-left corner of the axes.• pos = 3 places the legend in the lower-left corner of the axes.• pos = 4 places the legend in the lower-right corner of the axes.[legend_handle,object_handles] = legend(...) returns the handle of thelegend (legend_handle), which is an axes graphics object and the handles ofthe line, patch and text graphics objects (object_handles) used in the legend.These handles enable you to modify the properties of the respective objects.Remarkslegend associates strings with the objects in the axes in the same order thatthey are listed in the axes Children property. By default, the legend annotatesthe current axes.<strong>MATLAB</strong> displays only one legend per axes. legend positions the legend basedon a variety of factors, such as what objects the legend obscures. You move thelegend by pressing the left mouse button while the cursor is over the legend anddragging the legend to a new location. Double clicking on a label allows you toedit the label.2-259

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!