Error bars are automatically offset. they look correct just the error bar for any point should be located at the point before it
4 次查看(过去 30 天)
显示 更早的评论
scatter(t,d40avg)
hold on
%plot(t,trend40)
errorbar(d40avg,d40std)
hold off
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/456719/image.png)
0 个评论
采纳的回答
Daniel Pollard
2020-12-10
The scatter plot is
plot(t, d40avg).
The Error bar plot is
plot(d40avg, d40std).
At first glance it may look like the error bars are higher than you want, but actually they're further to the right. Instead, use
plot(t, d40avg, d40std)
to plot your error bars.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!