将xticklabels设为粗体

问题描述 投票:1回答:2

我正在尝试使xticklabels(单元格数组)加粗。我尝试了一些变体:

h=figure(1);
gca.XAxis.TickLabel='\bf{%g}'  % xticklabel is preassigned in box plot as text from cell array {'AB','CD','EF','GH'}.

但是,大多数导致类似的错误>>

Error using set, 
Conversion to double from struct is not possible

请为上述内容提供一个解决方法,如果可能,请为此提供默认属性设置器。

我正在使用MATLAB 2017a。

我正在尝试使xticklabels(单元格数组)加粗。我尝试了一些变体:h = figure(1); gca.XAxis.TickLabel ='\ bf {%g}'%xticklabel在盒图中已预先分配为单元格数组{'AB','...

matlab plot graphics properties label
2个回答
3
投票

您应该将FontWeight对象的XAxis属性更改为'bold',例如:


2
投票

以下将使XTickLabels为粗体:

© www.soinside.com 2019 - 2024. All rights reserved.