首页 > 其他 > 详细

matlab中boxplot字体大小设置

时间:2014-12-07 17:35:46      阅读:2858      评论:0      收藏:0      [点我收藏+]
网上找到的:
set(findobj(gca,‘Type‘,‘text‘),‘FontSize‘,18)

boxplot() uses the default axes labeling for the Y axes, but for the X axes, it uses text() to put the labels in place and it does not grab the axes FontSize when it does so.

Note: it is likely that with an 18 point font that the labels will overlap the y=0 axes.

意思就是boxplot的y轴坐标字体用的是默认的,可以通过

set(gca, ‘Fontsize‘, 14);

来修改

而x轴字体是通过text()放进去的,不能通过默认方法修改,可以通过修改Type=Text类型的字体来做到

set(findobj(gca,‘Type‘,‘text‘),‘FontSize‘,18)

 bubuko.com,布布扣

不过字体太大重叠了,用这个方法可以避免重叠

txt = findobj(gca,‘Type‘,‘text‘);
set(txt(3:end),‘VerticalAlignment‘, ‘Middle‘);

参考地址:

http://www.mathworks.com/matlabcentral/answers/2461-boxplot-xtick-label-size

 

matlab中boxplot字体大小设置

原文:http://www.cnblogs.com/wacc/p/4149546.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!