フィルターのクリア

small numbers in the legend

3 ビュー (過去 30 日間)
Luca Re
Luca Re 2023 年 9 月 29 日
編集済み: Voss 2023 年 9 月 29 日
leg =
3×1 cell array
{'1-Preset1- ==>0 $' }
{'2-Preset1_1- ==>0 $'}
{'3-Preset1_2- ==>0 $'}
leg=compose('%s',strArr(ii));
legend(Ax_Eq,leg,'Location','northwest');
hi,it'a possible to draw size normal?
Invalid expression. Check for missing or extra characters.

採用された回答

Voss
Voss 2023 年 9 月 29 日
編集済み: Voss 2023 年 9 月 29 日
The default text interpreter, tex, is interpreting the underscores as subscripts, so you can either:
(1) escape the underscores with backslashes
figure
Ax_Eq = axes();
plot(magic(3));
leg = { ...
'1-Preset1- ==>0 $'; ...
'2-Preset1\_1- ==>0 $'; ...
'3-Preset1\_2- ==>0 $'};
legend(Ax_Eq,leg,'Location','northwest')
or (2) change the interpreter to 'none'
figure
Ax_Eq = axes();
plot(magic(3));
leg = { ...
'1-Preset1- ==>0 $'; ...
'2-Preset1_1- ==>0 $'; ...
'3-Preset1_2- ==>0 $'};
legend(Ax_Eq,leg,'Location','northwest','Interpreter','none')
Option 2 is probably easier in this case.

その他の回答 (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