matlab中的乳胶字体 [英] Latex fonts in matlab

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

问题描述

是否可以将 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中的乳胶字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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