ADD LATeX legends and labels in MATLAB figures

16 ビュー (過去 30 日間)
Brave A
Brave A 2022 年 4 月 14 日
コメント済み: Brave A 2022 年 4 月 14 日
I tried to add represent LateX sympol in Legen of figures.
legend({'Mean Energy Consumption', 'Mean of $u_{i}$ Value', ...
'Client Selection Frequency'}, ...
'location', 'northwest');
but the LateX is not working for Legend.

採用された回答

Riccardo Scorretti
Riccardo Scorretti 2022 年 4 月 14 日
編集済み: Riccardo Scorretti 2022 年 4 月 14 日
Hi. You must add 'interpreter', 'latex':
figure
plot(rand(20, 3), 'o-');
legend({'Mean Energy Consumption', 'Mean of $u_{i}$ Value', ...
'Client Selection Frequency'}, ...
'location', 'northwest', ...
'interpreter', 'latex');
  1 件のコメント
Brave A
Brave A 2022 年 4 月 14 日
Thank you so much!

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

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