How to Hide Legend of Plot 2?

2 次查看(过去 30 天)
Matty
Matty 2022-10-14
回答: Star Strider 2022-10-14
zeys = n;
text = ['Run ',num2str(zeys)];
plot(x,y,'DisplayName',text);
plot(xmax,ymax,'^r')
legend show

回答(1 个)

Star Strider
Star Strider 2022-10-14
Perhaps —
zeys = n;
text = ['Run ',num2str(zeys)];
hp1 = plot(x,y,'DisplayName',text);
hp2 = plot(xmax,ymax,'^r');
legend(hp1, 'Location','best)
.
.

类别

Help CenterFile Exchange 中查找有关 Legend 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by