箱ひげ図で個人データ​をプロットしたい(線​で繋がることなく)

조회 수: 16 (최근 30일)
Raki Kawama
Raki Kawama 2023년 6월 17일
편집: Raki Kawama 2023년 6월 17일
現在、以下のコードを用いて箱ひげ図を作成しています。個人データもプロットしているのですが、個々人のプロット同士が箱ひげ図同士をまたがって繋がっています。ラインで繋げることなく、個人データのみをプロットしたいのです。
tbl1 = readtable('File name.csv'); %フォルダー内から呼び出し(複数のシートに分ける必要)
TimeOrder = {'A','B','C'};%横軸を定義
tbl1.Time = categorical(tbl1.Time,TimeOrder);%データをグループごとで分類
boxchart(tbl1.Time,tbl1.変数A,'GroupByColor',tbl1.Protocol)%BoxChartの作成
b1 = boxchart(tbl1.Time,tbl1.変数A,'GroupByColor',tbl1.Protocol) %BoxChart格納
meanValue1 = groupsummary(tbl1.変数A,tbl1.Time,'mean');
hold on
plot(meanValue1,'ok','LineWidth',0.1, 'Markersize',5.0,'MarkerFaceColor','k')
plot1 = plot(meanValue1,'ok')
plot1.LineWidth = 0.1;
a = table2cell(tbl1(:,3:4));
aaa = cell2mat(a)
aa = [aaa(1:23,2), aaa(24:46,2), aaa(47:69,2)] %各グループのセルを抽出し、プロットしていますが、ここでラインで繋がります。
for n = 1:23
plot(aa(n,:),':sk')
end
hold off
よろしくお願いいたします。筋ごとに回せば出来はしますが...。

답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!