How can I use the ERRORBAR function with a logarithmic axis in MATLAB?
Show older comments
When I type the following at the MATLAB prompt, I get a an errorbar with a log x axis:
x = 1:100;
y = sin(x);
e = std(y)*ones(size(x));
errorbar(x,y,e)
set(gca,'xscale','log')
However, the errorbars of the first point in the resulting figure extend much farther than the other errorbars. I would like a function that can account for the logrithmic X-axis and make all of the errorbars have a uniform width.
Accepted Answer
More Answers (0)
Categories
Find more on Errorbars in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!