Matlab中的Latex字体 [英] Latex fonts in matlab

查看:1070
本文介绍了Matlab中的Latex字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将matlab图的字体转换为与乳胶字体相同的字体.例如,我可以通过以下方式修改图的字体:

Is it possible to convert the font of a matlab plot to be the same of latex fonts. For example I can modify the font of a plot by:

x = -pi:.1:pi;
y = sin(x);
plot(x,y)
set(gca,'FontName','Helvetica');

是否可以对乳胶字体进行相同的操作(我说乳胶字体是因为我不确定乳胶作为其基本字体使用的字体的实际名称).

Is it possible to do the same but for latex fonts (I say latex fonts as I am not sure of the actual name of the font latex uses as its basic font).

推荐答案

对于任何文本对象,您只需将'Interpreter'属性设置为'latex'.因此,例如,您可以

For any text object you just need to set the 'Interpreter' property to 'latex'. So, for example you could do

xlabel('$$\int_0^x\!\int_y dF(u,v)$$','Interpreter','latex');

对于刻度标签,更困难,尽管可能会有可用文件使其变得更容易(示例).

For tick labels it is more difficult, though there may be files available to make it easier (example).

这篇关于Matlab中的Latex字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆