How could I change the axis for a boxplot that is automatically produced from ANOVA test?
4 ビュー (過去 30 日間)
古いコメントを表示
How could I change the axis on my boxplot? I did a ANOVA test and a box-plot was automatically produced. I have 3 groups for my analysis. By default, the group was labelled as 1, 2, 3 accordingly. I would like to change it to A, B, C.
I have tried to do something like this (see below), but it did not work.
boxplot([x1,x2],'Notch','on','Labels',{'A','B','C'})
1 件のコメント
Olisa Ezeh
2020 年 12 月 20 日
put a screen shot of your code workspace with all the syntaxes and variables
採用された回答
Ive J
2020 年 12 月 20 日
You can set XTickLabel property of the generated boxplot.
mydata = randn(20, 3);
anova1(mydata);
set(gca, 'XTickLabel', {'A', 'B', 'C'}) % the last gca is the boxplot by default.
Alternatively, use group argument of anova1:
mydata = rand(1, 60);
group = repmat({'A', 'B', 'C'}, 1, 20);
anova1(mydata, group)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Analysis of Variance and Covariance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!