Use subscript and superscript in legend

Hi all,
I am wondering how to implement text in a legend with both a superscript and a subscript, and with an horizontal bar, something like this:

 Risposta accettata

legend(['$\overline{H}_{subscript}^' ...
'{superscript}$'],...
'interpreter','latex')

Più risposte (2)

plot(1:10);
legend('$\overline{H}_{debris}^{front}$', ...
'Interpreter', 'latex', ...
'FontSize', 16, ...
'location', 'best')

Community Treasure Hunt

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

Start Hunting!

Translated by