plotのフォントサイズ
34 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
現在boxplotを使用して、図をplot したいと思っています。
plot_box_scatter(data, groupIdx, pos, color, symbol, opt);
xticks([1 2])
xticklabels({'controls','bbb'})
これのxticklabelsのフォントを大きく、出来れば太文字にしたいのですが、どのようにすれば出来るか教えていただきたいです。
下記のようにやったのですが出来なかったです。
xticklabels({'controls','bbb','FontSize',12,'FontWeight'})
1 Kommentar
Atsushi Ueno
am 27 Dez. 2021
Verschoben: Atsushi Ueno
am 17 Aug. 2022
関数形式も可能ですが項目数が多い為複雑になります。
Axesのプロパティの方が階層的な設定方法が分かり易いです。
data = [[0.548;0.4558;0.5265;0.6672;0.6672;0.4702;0.6463;0.6138;0.486;0.3974;0.5638;0.5938;0.6179;0.5156] ...
[0.5056;0.5037;0.437;0.5644;0.4939;0.5133;0.5654;0.4365;0.5048;0.6218;0.5089;0.5975;0.5836;0.618]];
groupIdx = repmat([1;2], [1,size(data,1)]);
ax = plot_box_scatter(data, groupIdx);
ax.XTick = [1 2]; % xticks([1 2])と同じ
ax.XTickLabel = {'controls','bbb'}; % xticklabels({'controls','bbb'})と同じ
ax.XAxis.FontSize = 12; % xticklabelsのフォントを大きく
ax.XAxis.FontWeight = 'bold'; % xticklabelsのフォントを太文字にしたい
Antworten (0)
Siehe auch
Kategorien
Mehr zu Axis Labels finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!