Refresh legend from the command line
显示 更早的评论
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?
采纳的回答
更多回答(3 个)
Junaid
2012-1-19
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..:-)
Jim Hokanson
2018-12-20
I've found hiding and showing the legend works.
ax = gca; %might be different ...
legend(ax,'hide');
legend(ax,'show');
类别
在 帮助中心 和 File Exchange 中查找有关 Legend 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!