Changing Multcompare order of groups

1 次查看(过去 30 天)
I have 2 variables, environment and audio. The mult compare lists the audio as High Low Medium, I want it as High Medium Low.
[SurveyEnvironmentLevel, SurveyAudioLevel] = ParsingCategory(file);
response = responseData(:,3);
varnames = {'Audio';'Environment'};
% Switching Audio and Environment causes enviornment to go hi lo hi lo hi lo
[~,b,stats] = anovan(response,{SurveyAudioLevel,SurveyEnvironmentLevel},'model','interaction','varnames',varnames);
[c,m,h] = multcompare(stats,'Dimension',[1 2]);
The SurveyEnvironmentLevel and SurveyAudioLevel are single column arrays.

采纳的回答

Ebsa Eshete
Ebsa Eshete 2020-2-9
I figured it out, I had to change the YData attribute in the axes.
ch = h.Children(1).Children(); %children of the axes
% moving 2 to 1
lineHandlesCat2 = ch(3);
lineHandlesCat2Marker = ch(4);
set(lineHandlesCat2,'YData',[1,1])
set(lineHandlesCat2Marker,'YData',[1])
% Moving 1 to 2
lineHandlesCat1 = ch(1);
lineHandlesCat1Marker = ch(2);
set(lineHandlesCat1,'YData',[2,2])
set(lineHandlesCat1Marker,'YData',[2])

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by