2015-04-18 37 views
1

我正在MATLAB中生成许多图。包含在我的最终文档中时,轴标签和刻度标签目前太小。我想更改轴标签和刻度标签的字体大小,同时设置新的默认字体。我已尝试FontSizeFontName名称值对,但奇怪地看到导出的.eps文件没有影响;这种方法也有点不切实际,因为我产生了大量的图。以编程方式更改MATLAB中所有图形中所有字体类型和大小的简单方法

任何建议将不胜感激。

+0

你可以看看[exportfig](http://blogs.mathworks.com/pick/2010/05/28/creating-and-exporting-publication-quality-graphics/ )或该[博客帖子](http://blogs.mathworks.com/loren/2007/12/11/making-pretty-graphs/) – Maurits

回答

2

您可以使用findobj以编程方式编辑所有数据。 例如:

ah = findobj(,'Type','axes'); % get all axes 
set(ah,'FontSize',Whatever); %this will change all the tick labels 
for m=1:numel(ah) % go over all axes 
    xlabel_handle = get(ah(m),'xlabel'); 
    set(xlabel_handle,'FontSize',Whatever); % this will change only the label 
    %repeat for other labels if you wish 
end 
相关问题