Error bars in loglog plot
170 views (last 30 days)
Show older comments
Marisabel Gonzalez
on 14 Mar 2019
Commented: Star Strider
on 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
0 Comments
Accepted Answer
Star Strider
on 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 Comments
More Answers (0)
See Also
Categories
Find more on Errorbars in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!