MATLAB:图形字体 [英] MATLAB: figure fonts

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

问题描述

格式为xlabel('$<stuff>$','interpreter','latex');的命令将产生一个轴标签,该标签由TeX使用可能是ComputerModern的字体排版.但是,轴刻度标签(例如0、1、2,...)以默认字体(Helvetica?)出现.我想同步图中的所有字体(最好是ComputerModern).

A command of the form xlabel('$<stuff>$','interpreter','latex'); will produce an axis label that is typeset by TeX using a font that is presumably ComputerModern. However, the axis tick labels (e.g., 0, 1, 2, ...) appear in the default font (Helvetica?). I would like to synchronize all the fonts in the figure (preferably to ComputerModern).

为此,我认为set(0,'DefaultAxesFontName', '<fontname>')形式的命令可能会有用.但是,我需要知道MATLAB TeX解释器使用的字体的确切名称或路径.如何检索字体名称的字符串值或默认图形字体和TeX解释的默认字体的指向字体文件的路径?

Toward that end, I presume that a command of the form set(0,'DefaultAxesFontName', '<fontname>') may be useful. However, I need to know the exact name or path of the font used by the MATLAB TeX interpreter. How can I retrieve a string value for the font name or a path pointing to the font file for the default figure font and the default TeX-interpreted font?

推荐答案

您还可以使用乳胶绘制轴刻度,请看这里: http://alex.bikfalvi.com/research/latex_in_matlab_ticks/

You could also plot the axis ticks with latex, look here: http://alex.bikfalvi.com/research/latex_in_matlab_ticks/

实际上,您的命令正确使用了默认字体(当不使用乳胶时):

Actually, your command was right to mget the default font (when NOT using latex):

get(0,'defaultaxesfontname')

但是我没有找到任何默认的乳胶字体.也许可以通过使用内部Java例程来实现(要获得一些想法,请查看 http://undocumentedmatlab.com/)

But I didn't find any to get the default latex font. Perhaps it would be possible by using the internal java routines (to get some ideas, look at http://undocumentedmatlab.com/)

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

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