ADD LATeX legends and labels in MATLAB figures

98 次查看(过去 30 天)
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');

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by