Question about latex interpreter for title and legend of matlab plot
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Vivian
am 5 Nov. 2016
Kommentiert: Star Strider
am 5 Nov. 2016
I want to know why it show error . script under is in Matlab environment. Thank you for advance.
plot(rand(3));
title('Angle=20^{\circ} - V=75{\km\per\hour}','Interpreter','latex');
lgd = legend('p1','p2','p3','Location','northwest','Interpreter','latex');
0 Kommentare
Akzeptierte Antwort
Star Strider
am 5 Nov. 2016
The legend function does not allow you to set the interpreter as one of the main arguments. You have to return a handle to it, and then use that to set the interpreter:
lgd = legend('p1','p2','p3','Location','northwest');
set(lgd,'Interpreter','latex')
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!