varphi Matlab / Latex character

129 views (last 30 days)
Bogdan Dzonlaga
Bogdan Dzonlaga on 24 Sep 2018
Commented: Muhammad on 15 Jul 2022
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 !

Accepted Answer

Bish Erbas
Bish Erbas on 24 Sep 2018
Try
legend({'$\varphi$'},'Interpreter','latex');
  2 Comments
Chen
Chen on 12 Apr 2021
I meet the same problem.And the code '$\varphi$' or '\varphi' can't be explained by matlab.
Chen
Chen on 12 Apr 2021
It worked.thank you very much!

Sign in to comment.

More Answers (1)

Bogdan Dzonlaga
Bogdan Dzonlaga on 24 Sep 2018
It works perfectly, thank you very much !

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!