Indicating statistical significance on boxplot in matlab
古いコメントを表示
I am plotting two boxplots with my sample data sets in matlab. I wanted to put a star sign between the boxplots indicating the statistical significance. When i draw this star, its adjusted to one corner rather than between the boxes. I am attaching the boxplot with this. Any help to solve this will be appreciated.
x1 = required_data_threhold_time_for_recruitment_gdnest;
x2 = required_data_threhold_time_for_recruitment_bdnest;
x = [x1 ;x2];
g = [ones(size(x1)); 2*ones(size(x2))];
boxplot(x,g,'Labels',{'Good nest (1 lux)','Poor nest (16 lux)'});
ylabel('Time(seconds)')
yt = get(gca, 'YTick');
axis([xlim 0 ceil(max(yt)*1.2)])
set(gca, 'Xtick', 1:3);
xt = get(gca, 'XTick');
hold on
plot(xt([2 3]), [1 1]*max(yt)*1.1, '-k', mean(xt([2 3])), max(yt)*1.15, '*k')

hold off
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Exploration and Visualization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!