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

问题描述

我正在执行以下操作(这是一个说明问题的简单示例):

I am doing the following (this is a simple example to illustrate the problem):

a = [1,3,4];
b = [1,4,5];
plot(a,b,'LineWidth',4);
xlabel('recall','FontSize',35);
ylabel('precision','FontSize',4);

它产生:

如您所见,'FontSize'没有任何作用.我还得到了如下所示的xlabel的属性:

As you can see the 'FontSize' is having no effect. I have also got the properties of the xlabel shown below:

xl = xlabel('recall','FontSize',35);
get(xl)
    FontAngle = normal
    FontName = Helvetica
    FontSize = [35]
    FontUnits = points
    FontWeight = normal

推荐答案

您必须安装软件包:

  • xfonts-100dpi
  • xfonts-75dpi.

根据此线程中的建议,因为没有Ubuntu 12.04使用MATLAB特定的字体.

as suggested in this thread because Ubuntu 12.04 doesn't come with MATLAB specific fonts.

这篇关于Matlab:更改xlabel和ylabel的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 03:17