フィルターのクリア

skip items in a legend

201 ビュー (過去 30 日間)
Luca Re
Luca Re 2023 年 7 月 22 日
コメント済み: Star Strider 2023 年 7 月 23 日
i see this post
but i don't understan how resolve it
i don't want visualize 'str2' in legend
str1='A';
str2='';
str3='C';
legend(str1,str2,str3,'Location','northwest')
Warning: Ignoring extra legend entries.
> In legend>process_inputs (line 592)
In legend>make_legend (line 319)
In legend (line 263)
In Predator_grafici_Struct (line 67)

採用された回答

Star Strider
Star Strider 2023 年 7 月 22 日
Perhaps this —
x = 0:10;
y1 = randn(size(x));
y2 = randn(size(x));
y3 = randn(size(x));
figure
hp1 = plot(x, y1, 'DisplayName','A');
hold on
hp2 = plot(x, y2, 'DisplayName','B');
hp3 = plot(x, y3, 'DisplayName','C');
hold off
grid
legend([hp1 hp3], 'Location','best')
.
  5 件のコメント
Luca Re
Luca Re 2023 年 7 月 23 日
correct! thank
Star Strider
Star Strider 2023 年 7 月 23 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by