How to change x-axis in kruskalwallis auto-generated boxplots?

조회 수: 2 (최근 30일)
BN
BN 2021년 11월 24일
댓글: BN 2021년 11월 24일
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);
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

채택된 답변

Yusuf Suer Erdem
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개)

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by