varphi Matlab / Latex character

Hi,
Does anyone know if it is possible to use the \varphi character in a legend of a graph ? I have set my default interpreter as "tex" but still the \varphi is not printed properly.
set(groot, 'defaultAxesTickLabelInterpreter','tex'); set(groot, 'defaultLegendInterpreter','tex'); set(0, 'defaultTextInterpreter', 'tex');
legend('\varphi', 'k');
I have tried using $\varphi$, and changing the interpreter to 'latex' but without success.
Thanks in advance !

 Respuesta aceptada

Bish Erbas
Bish Erbas el 24 de Sept. de 2018

3 votos

Try
legend({'$\varphi$'},'Interpreter','latex');

2 comentarios

Chen
Chen el 12 de Abr. de 2021
I meet the same problem.And the code '$\varphi$' or '\varphi' can't be explained by matlab.
Chen
Chen el 12 de Abr. de 2021
It worked.thank you very much!

Iniciar sesión para comentar.

Más respuestas (1)

Bogdan Dzonlaga
Bogdan Dzonlaga el 24 de Sept. de 2018

0 votos

It works perfectly, thank you very much !

Categorías

Más información sobre Data Distribution Plots en Centro de ayuda y File Exchange.

Preguntada:

el 24 de Sept. de 2018

Comentada:

el 15 de Jul. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by