Refresh legend from the command line
Show older comments
Right-clicking a legend gives the option to "refresh" the legend.
Does anyone know of a way to call "refresh legend" from the command line?
Accepted Answer
More Answers (3)
Junaid
on 19 Jan 2012
Dear,
legend('-DynamicLegend');
it will refresh. And update the contents dynamically, either you delete something from plot or you add something:-)
I hope this is what you are required..:-)
Stephan Heise
on 19 Jan 2012
Jim Hokanson
on 20 Dec 2018
I've found hiding and showing the legend works.
ax = gca; %might be different ...
legend(ax,'hide');
legend(ax,'show');
Categories
Find more on Legend in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!