如何将 Matlab 中用于绘图的字体设置为默认的 Latex 字体?

How to set the font used for plots in Matlab to the default Latex font?

经过一些研究,我注意到在 Matlab 刻度标签中使用默认的 Latex 字体并不容易。有人知道哪个 Matlab 字体名称与 Latex 默认字体最匹配吗?

或者,最近有人想出了一种将刻度标签设置为 Latex 默认字体的简单方法吗?

This 一定是您的解决方案。

当我使用时:

set(gca,'TickLabelInterpreter','latex') 

我得到这个作为输出:

看起来像 Latex 字体。