How do I turn off the automatic updates of the legend function, a lot of the times I only want to label just a few of the curves to avoid over-crowding. Is there a switch I can turn off automatic updates of “legend”? (From help: “legend creates a ...

29 views (last 30 days)
How do I turn off the automatic updates of the legend function, a lot of the times I only want to label just a few of the curves to avoid over-crowding. Is there a switch I can turn off automatic updates of “legend”?
(From help: “legend creates a legend … The legend automatically updates when you add or delete data series from the axes. This command creates a legend for the current axes or chart returned by gca. If the current axes is empty, then the legend is empty. If axes do not exist, then this command creates one.”)

Accepted Answer

Steven Lord
Steven Lord on 13 Sep 2019
On the legend documentation page the third entry in the Compatibility Considerations section states "If you do not want the legend to automatically update, set the AutoUpdate property of the legend to 'off'"
To answer your comment about tags, they can help make your post easier to find. Sometimes people have queries for specific tags related to their particular interests. For this, "legend" or "automatic update" seem like relevant tags for the question you asked. "help" is too generic in my opinion.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!