Matlab 带有标准误差条的散点图的x轴刻度上的文本
我试图绘制散点图,每个散点图都有一个错误条。见下面的代码:Matlab 带有标准误差条的散点图的x轴刻度上的文本,matlab,plot,matlab-figure,axis-labels,errorbar,Matlab,Plot,Matlab Figure,Axis Labels,Errorbar,我试图绘制散点图,每个散点图都有一个错误条。见下面的代码: dfs = [0 5 10]; Accuracies = [63.1681 49 56]; SE = [0.0142 0.065 0.04 ]*100; errorbar(dfs, Accuracies, SE, 'ro'); hold on plot(dfs,Accuracies,'bo'); title('Accuracies'); hold off; ylim([40 70]) names = {'Cond1'; 'Cond
dfs = [0 5 10];
Accuracies = [63.1681 49 56];
SE = [0.0142 0.065 0.04 ]*100;
errorbar(dfs, Accuracies, SE, 'ro');
hold on
plot(dfs,Accuracies,'bo');
title('Accuracies');
hold off;
ylim([40 70])
names = {'Cond1'; 'Cond2'; 'Cond3'};
set(gca,'xtick',[1:3],'xticklabel',names)
但是,x轴标签未正确对齐。这种情况的解决方案是什么?您需要将
xtick
s设置为dfs
。将它们设置为[1:3]
仅保留[1 2 3]
,并删除其余部分
set(gca, 'xtick', dfs, 'xticklabel', names);
xlim([-1 11]); %just for better visualisation
非常感谢Sardar:)另一个问题:有可能把圆点放大吗?致以最诚挚的问候,佩加在使用
errorbar
和plot
时,您需要更改该属性的'MarkerSize'
属性。