matlabのプロットについてです。
プロットにジッターを入れてみました。重なり合うプロットが見やすくなります。
ジッターを入れるには、横軸に乱数を入れて調整しています。
clear;close all
filename='data.csv';
T=readtable(filename);
T1=T{:,6};
T2=T{:,7};
T3=T{:,8};
T4=T{:,6};
T5=T{:,7};
T6=T{:,8};
mT1=mean(T1,"omitnan");
mT2=mean(T2,"omitnan");
mT3=mean(T3,"omitnan");
mT4=mean(T4,"omitnan");
mT5=mean(T5,"omitnan");
mT6=mean(T6,"omitnan");
mT=[mT1 mT2 mT3 mT4 mT5 mT6];
mTx=[1.5 2 2.5 3.5 4 4.5];
hold on
N=length(T1);
f1=scatter(1.5*ones(N,1),T1);
f2=scatter(2*ones(N,1),T2);
f3=scatter(2.5*ones(N,1),T3);
f4=scatter(-0.1+0.2*rand(N,1)+3.5*ones(N,1),T4);
f5=scatter(-0.1+0.2*rand(N,1)+4*ones(N,1),T5);
f6=scatter(-0.1+0.2*rand(N,1)+4.5*ones(N,1),T6);
xlim([0 6])
ylim([-0.03 0.06])
f1.MarkerFaceColor='#0072B2';
f1.MarkerFaceAlpha=0.7;
f1.MarkerEdgeColor='#0072B2';
f1.SizeData=60;
f2.MarkerFaceColor='#F0E442';
f2.MarkerFaceAlpha=0.7;
f2.MarkerEdgeColor='#F0E442';
f2.SizeData=60;
f3.MarkerFaceColor='#D55E00';
f3.MarkerFaceAlpha=0.7;
f3.MarkerEdgeColor='#D55E00';
f3.SizeData=60;
f4.MarkerFaceColor='#0072B2';
f4.MarkerFaceAlpha=0.7;
f4.MarkerEdgeColor='#0072B2';
f4.SizeData=60;
f5.MarkerFaceColor='#F0E442';
f5.MarkerFaceAlpha=0.7;
f5.MarkerEdgeColor='#F0E442';
f5.SizeData=60;
f6.MarkerFaceColor='#D55E00';
f6.MarkerFaceAlpha=0.7;
f6.MarkerEdgeColor='#D55E00';
f6.SizeData=60;
ax=gca;
ax.YGrid='on';
ax.FontName='Times New Roman';
ax.FontSize=12;
ax.Title.String=['Effect of adding jitter'];
ax.Title.FontName='Times New Roman';
ax.Title.FontSize=20;
ax.XLabel.FontName='Times New Roman';
ax.XLabel.FontSize=16;
ax.XLabel.FontWeight='bold';
ax.YLabel.FontName='Times New Roman';
ax.YLabel.FontSize=16;
ax.YLabel.FontWeight='bold';
ax.YLabel.String='α';
ax.XTickLabel=[{' '},{' '},{'Before'},{' '},{'After'},]
ax.XAxis.FontSize = 16;
ax.XAxis.FontWeight = 'bold';