MATLAB绘图显示拉丁字母,而不是希腊字母

MATLAB绘图显示拉丁字母,而不是希腊字母,matlab,plot,Matlab,Plot,我的情节中需要希腊符号。到目前为止,我有以下代码 imshow(img); axis on; axis([0, 300, 0, 300]); set(gca, 'XAxisLocation','top'); set (gca,'FontName','Symbol'); hx = xlabel({'\phi -->'}); hy = ylabel('<-- \rho'); 将解释器更改为latex就可以了。下面的代码将导致正确的渲染 imshow(img); axis on; axi

我的情节中需要希腊符号。到目前为止,我有以下代码

imshow(img);
axis on;
axis([0, 300, 0, 300]);
set(gca, 'XAxisLocation','top');
set (gca,'FontName','Symbol');
hx = xlabel({'\phi -->'});
hy = ylabel('<-- \rho');

将解释器更改为
latex
就可以了。下面的代码将导致正确的渲染

imshow(img);
axis on;
axis([0, 300, 0, 300]);
set(gca, 'XAxisLocation','top');
xlabel('$\phi \longrightarrow$','interpreter','latex')
ylabel('$\longleftarrow \rho$','interpreter','latex');
根据,
解释器可以有3个值:

“tex”-使用tex标记的子集解释字符

“latex”-使用latex标记解释字符

“无”-显示文字字符


看起来“tex”模式不包括显示希腊符号

@StewieGriffin
$\phi$
被翻译成
$f$
集合(gca,'FontName','Symbol')注释这行?尝试将解释器更改为latex。也许这样行吗?“顺便说一句,你的代码对我有用。”斯图维格里芬更改解释器有效。你想发布一个答案吗?谢谢。我很高兴能帮上忙:-)
imshow(img);
axis on;
axis([0, 300, 0, 300]);
set(gca, 'XAxisLocation','top');
xlabel('$\phi \longrightarrow$','interpreter','latex')
ylabel('$\longleftarrow \rho$','interpreter','latex');