How to write _ in a plot legend?
48 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
xxx = {'a_b'}
plot(1:5)
legend(xxx)
>> result is
i want to 'a_b' in legend .......
How to write ??
0 commentaires
Réponse acceptée
Cris LaPierre
le 4 Fév 2021
Set the interpreter to 'none'
xxx = {'a_b'};
plot(1:5)
legend(xxx,'interpreter','none')
Plus de réponses (2)
weikang zhao
le 4 Fév 2021
- change the Interpreter like other answers
- Tex has its own escape for _ :
legend('a\_b');
0 commentaires
Voir également
Catégories
En savoir plus sur Legend dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!