你忘了 hold on 。添加一些更好的绘图选项:
hold on
hold on % same thing you have but with markers! splitapply(@(x,y)plot(x,y,'marker','.','markersize',20),a(:,2),a(:,3),findgroups(a(:,4))) axis([2.05 2.45 0 6]) %same as excel grid on