anova1関数で出る規定の箱ひげ図のデザインを変えることはできますか?
Mostrar comentarios más antiguos
図のようにタイトルや軸のプロパティは変更できますが、箱ひげ図の色や、外れ値の除外などができません。
方法をご教授いただければ幸いです。
Respuestas (1)
Atsushi Ueno
el 17 de Dic. de 2023
Editada: Atsushi Ueno
el 17 de Dic. de 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:凹ませる)
3 comentarios
Atsushi Ueno
el 17 de Dic. de 2023
Editada: Atsushi Ueno
el 17 de Dic. de 2023
Atsushi Ueno
el 17 de Dic. de 2023
KO
el 20 de Dic. de 2023
Categorías
Más información sobre 反復測定と多変量分散分析 (MANOVA) en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!