Error bars are automatically offset. they look correct just the error bar for any point should be located at the point before it
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Liam Williams
le 10 Déc 2020
Commenté : Liam Williams
le 10 Déc 2020
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 commentaires
Réponse acceptée
Daniel Pollard
le 10 Déc 2020
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Bar Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!