素点を含む棒グラフの作り方

6 ビュー (過去 30 日間)
KO
KO 2022 年 7 月 2 日
コメント済み: KO 2022 年 7 月 14 日
添付画像のような、各被験者ごとの値をプロットで表示した棒グラフはどのように作れるのでしょうか。
初歩的な質問ですみませんが、よろしくお願い致します。

採用された回答

Atsushi Ueno
Atsushi Ueno 2022 年 7 月 3 日
swarmchart関数はどうでしょう
x1 = ones(1,50);
x2 = 2 * x1;
y1 = [rand(1,30)*2-1 ones(1,10) -ones(1,10)];
y2 = [rand(1,30)*2-1 ones(1,10) -ones(1,10)];
swarmchart(x1,y1,25,'k','filled','XJitter','rand','XJitterWidth',0.5);
hold on
swarmchart(x2,y2,25,'k','filled','XJitter','rand','XJitterWidth',0.5);
yline(0,'--');
line([0.75,1.25],[mean(y1) mean(y1)],'Color','k');
line([1.75,2.25],[mean(y2) mean(y2)],'Color','k');
hold off
  4 件のコメント
Atsushi Ueno
Atsushi Ueno 2022 年 7 月 13 日
KO
KO 2022 年 7 月 14 日
いつも本当にありがとうございます。
今後ともよろしくお願いいたします。

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!