Plot two or more multcompare results vertically in one figure
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
The multcompare test plots the lines horizontaly while the model names on verticle axis. How can I plot the lines vertically and model names on horizontal axis similar to the give figure. Morever, how can I show the results of two(or more) multicopmare tests in one figure (considerint the results as group data).
Any simple example could be used e.g.,
load carsmall % load data
[p,t,stats1] = anova1(MPG,Origin,'off'); %test 1 for group 1
[c,m,h,nms] = multcompare(stats1); %multicompare 1 for group 1
[p,t,stats2] = anova1(MPG+4,Origin,'off'); %test 2 for group 2
[c,m,h,nms] = multcompare(stats2); %multicompare 2 for group 2
However, I need the output similar to the attached figure
댓글 수: 0
답변 (1개)
Aditya
2023년 2월 27일
Hi,
I understand that you want to have the figure rotated.
load carsmall % load data
[p,t,stats1] = anova1(MPG,Origin,'off'); %test 1 for group 1
[c,m,h,nms] = multcompare(stats1); %multicompare 1 for group 1
[p,t,stats2] = anova1(MPG+4,Origin,'off'); %test 2 for group 2
[c,m,h,nms] = multcompare(stats2); %multicompare 2 for group 2
camroll(90)
You can use Rotate 3D Tool of figure for changing orientation in general
For plotting together, there are many strategies. You can try using subplot
load carsmall % load data
[p,t,stats1] = anova1(MPG,Origin,'off'); %test 1 for group 1
camroll(90)
subplot(1,2,1)
[c,m,h,nms] = multcompare(stats1); %multicompare 1 for group 1
[p,t,stats2] = anova1(MPG+4,Origin,'off'); %test 2 for group 2
subplot(1,2,2)
[c,m,h,nms] = multcompare(stats2); %multicompare 2 for group 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Estimation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!