MATLAB Answers

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 ...

35 views (last 30 days)
Paul
Paul on 13 Sep 2019
Answered: Steven Lord on 13 Sep 2019
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.”)

  1 Comment

Sign in to comment.

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.

  0 Comments

Sign in to comment.

More Answers (0)