anova1関数で出る規定の箱ひげ図のデザインを変えることはできますか?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
図のようにタイトルや軸のプロパティは変更できますが、箱ひげ図の色や、外れ値の除外などができません。
方法をご教授いただければ幸いです。
0 commentaires
Réponses (1)
Atsushi Ueno
le 17 Déc 2023
Modifié(e) : Atsushi Ueno
le 17 Déc 2023
% サンプルデータ引用先:https://jp.mathworks.com/help/stats/anova1.html#brx09p9-27
strength = [82 86 79 83 84 85 86 87 74 82 78 75 76 77 79 79 77 78 82 79];
alloy = {'st','st','st','st','st','st','st','st',...
'al1','al1','al1','al1','al1','al1',...
'al2','al2','al2','al2','al2','al2'};
xgroupdat = categorical(alloy);
[p,tbl,stats] = anova1(strength,alloy,'off'); % 'off': ANOVA 表と箱ひげ図を表示しない
figure;
b = boxchart(xgroupdat,strength);
b.BoxFaceColor = [0 0.5 0]; % ボックスの色
b.MarkerStyle = "none"; % 外れ値スタイル (none:表示しない)
% b.JitterOutliers = true; % 外れ値マーカー変位 (表示しないからどっちでもいい)
b.Orientation = "vertical"; % ボックス チャートの方向
b.Notch = true; % 中央値比較表示 (true:凹ませる)
Voir également
Catégories
En savoir plus sur 分散分析と共分散分析 dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!