skip legend entries in property editor?
2 次查看(过去 30 天)
显示 更早的评论
I have a .fig file where i'd like to delete the first 8 legend entries without effecting the other ones. Figure is attached. tried it with property editor but it doesn't work. I'm running 2017b.
0 个评论
回答(1 个)
Bhaskar R
2020-3-5
ax = gca;
ax_data = ax.Children;
legend(ax_data(1:5), fliplr(ax.Legend.String(9:end)))
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!