Matlab: changing font size on xlabel and ylabel

被刻印的时光 ゝ 提交于 2019-12-11 10:33:52

问题


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);

and it produces:

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

回答1:


You have to install packages:

  • xfonts-100dpi
  • xfonts-75dpi.

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



来源:https://stackoverflow.com/questions/16190685/matlab-changing-font-size-on-xlabel-and-ylabel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!