How to change x-axis in kruskalwallis auto-generated boxplots?
5 次查看(过去 30 天)
显示 更早的评论
Dear all, I want to change the x-axis labels of the auto-generated Kruskal-Wallis test boxplot.
so if this is the code
clear; clc;
A = rand(1000,1);
B = rand(1000,1);
AB = [A B];
[p, tbl, stats] = kruskalwallis(AB);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/811569/image.jpeg)
I want to change the x labels to group one and group two instead of 1, 2. So is there any way to do this?
Thank you all
0 个评论
采纳的回答
Yusuf Suer Erdem
2021-11-24
Hi BN, try these codes below please. Good luck.
clear; clc;
A = rand(1000,1);
B = rand(1000,1);
AB = [A B];
[p, tbl, stats] = kruskalwallis(AB);
xticklabels({'group one','group two'});
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!