text in plot with latex interpreter

122 vues (au cours des 30 derniers jours)
Luis Isaac
Luis Isaac le 12 Déc 2020
Commenté : Luis Isaac le 12 Déc 2020
Dear
I would like to write come text in a simple plot using latex codification
The plot is here
The text in plot is code as follows:
text(x0 ,y0-(i-1)*dy,sprintf('$$c_{[\rho_{e}]_w^m}$$= %.3f',b(i)), ...
'Interpreter', 'latex', ...
'fontsize', 10);
Why dose the subscript of c is not the greek letter rho?
thanks in advance
  1 commentaire
Luis Isaac
Luis Isaac le 12 Déc 2020
many thanks!!

Connectez-vous pour commenter.

Réponse acceptée

Cris LaPierre
Cris LaPierre le 12 Déc 2020
Modifié(e) : Cris LaPierre le 12 Déc 2020
Because sprintf interprets '\r' as a carriage return. Use '\\r' instead.
text(.1,.5,sprintf('$$c_{[\\rho_{e}]_w^m}$$= %.3f',18.556), ...
'Interpreter', 'latex', 'fontsize', 10);

Plus de réponses (0)

Catégories

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by