Are multcompare plots compatible with subplots?

4 ビュー (過去 30 日間)
Rainer
Rainer 2013 年 5 月 14 日
コメント済み: Kamil Antos 2019 年 5 月 20 日
Does anyone know if it is possible to have the graphs from multcompare be plotted in subplots?
  • load carsmall
  • [p,t,st] = anova1(MPG,Origin,'off');
  • [p,t,st2] = anova1(Displacement,Origin,'off');
  • figure
  • [c,m,h,nms] = multcompare(st);
  • figure
  • [c,m,h,nms] = multcompare(st2);
The script above generates 2 graphs. I have tried every which way to get the graphs to be in a 2,1 subplot but can't do it.

採用された回答

Tom Lane
Tom Lane 2013 年 5 月 15 日
You are right that the code clears the current figure before plotting, so setting up a subplot won't help.
I just tried deleting the "clf" line from meansgraph.m, and it seemed to work okay. It looks a little funny since the function puts up a graph title instructing you to click on a group, and this instruction then appears over each graph, but the mouse operations work as they should.
You could try deleting this line.
  1 件のコメント
Rainer
Rainer 2013 年 5 月 15 日
Thanks a lot Tom. That worked.

サインインしてコメントする。

その他の回答 (1 件)

Sergio
Sergio 2013 年 7 月 24 日
But meansgraph.m is a Read Only file. How can I delet that line?
  2 件のコメント
Tom Lane
Tom Lane 2013 年 7 月 25 日
If you control the disk where it is stored, you may just be able to overwrite the old file. Otherwise you may have to make your own copies of multcompare, meansgraph, and perhaps some others, and place them in your own area.
Kamil Antos
Kamil Antos 2019 年 5 月 20 日
You can create local version of meansgraph.m with commented 'clf'. Matlab will use this file.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAnalysis of Variance and Covariance についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by