Effacer les filtres
Effacer les filtres

Error bars in loglog plot

118 vues (au cours des 30 derniers jours)
Marisabel Gonzalez
Marisabel Gonzalez le 14 Mar 2019
Commenté : Star Strider le 14 Mar 2019
Hi, I just want to plot a single data point from which I have the upper, mean and lower values for my X and Y (shown below). I am using a loglog plot and the errorbar function does not provides me with the right answer. Any suggestions? Thanks
x_u = 2.2222e-12
x_m = 2.7111e-12
x_l = 3.2000e-12
y_u = 1.8257e-04
y_m = 1.6200e-04
y_l = 1.4142e-04

Réponse acceptée

Star Strider
Star Strider le 14 Mar 2019
You appear to have ‘x_u’ and ‘x_l’ reversed.
Try this:
x_u = 3.2000e-12;
x_m = 2.7111e-12;
x_l = 2.2222e-12;
y_u = 1.8257e-04;
y_m = 1.6200e-04;
y_l = 1.4142e-04;
figure
errorbar(x_m, y_m, y_l, y_u, x_l, x_u)
set(gca, 'XScale','log', 'YScale','log')
grid
axis([1E-13 1E-10 1E-5 1E-3])
Experiment to get the result you want.
  2 commentaires
Marisabel Gonzalez
Marisabel Gonzalez le 14 Mar 2019
Thanks! For the correction and for the help!
Star Strider
Star Strider le 14 Mar 2019
As always, my pleasure!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Errorbars dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by