How do I turn off the LaTeX interpreter in my legend within MATLAB?
640 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am displaying strings with underscores "_" in the legend on my plot. When the LaTex interpreter is used, the underscores are causing subscript letters. I would like to override the LaTeX interpreter so the legend appears exactly as the input string.
Akzeptierte Antwort
MathWorks Support Team
am 18 Okt. 2013
The LaTeX interpreter can be turned off for a text object by setting the 'Interpreter' property to 'none'. You can specify the interpreter to be used with the legend using the 'Interpreter' parameter/value pair input argument to the LEGEND function. For example,
figure; plot(1:10)
l = legend({'test_line'}, 'Interpreter', 'none');
Note that the legend string(s) must be enclosed in a cell array.
You can also set the 'Interpreter' property after the creation of the legend:
figure; plot(1:10)
l = legend('test_line');
set(l, 'Interpreter', 'none')
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Legend 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!