Error bars in loglog plot

135 Ansichten (letzte 30 Tage)
Marisabel Gonzalez
Marisabel Gonzalez am 14 Mär. 2019
Kommentiert: Star Strider am 14 Mär. 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

Akzeptierte Antwort

Star Strider
Star Strider am 14 Mär. 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 Kommentare
Marisabel Gonzalez
Marisabel Gonzalez am 14 Mär. 2019
Thanks! For the correction and for the help!
Star Strider
Star Strider am 14 Mär. 2019
As always, my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Errorbars finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by