Printing special characters in an axis label

13 vues (au cours des 30 derniers jours)
L'O.G.
L'O.G. le 6 Déc 2022
How do you print special character(s) using sprintf? I want to use this or similar to add special characters to an axis label as in the following:
Here the degree sign doesn't print:
ylabel(sprintf('T at %.0f \circF',Temp))

Réponse acceptée

Walter Roberson
Walter Roberson le 6 Déc 2022
Temp = -19.6
Temp = -19.6000
ylabel(sprintf('T at %.0f \\circF',Temp), 'Interpreter', 'tex')

Plus de réponses (0)

Catégories

En savoir plus sur Labels and Annotations dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by