Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using errorbar() with semilogy() in MATLAB?

I'd like to plot data x & y with errorbars, ebar, and its fit, yfitted, on a semilog plot. This doesn't seem to work:

figure;
hold on;
errorbar(x,y,ebar);
semilogy(x,yfitted);

Instead of semilog plot I get a linear plot. What should I be doing differently?

like image 797
AndyL Avatar asked Aug 23 '10 17:08

AndyL


1 Answers

try

h = errorbar(x,y,ebar);
set(get(h,'Parent'), 'YScale', 'log')

or

ax = axes();
errorbar(ax, x,y,ebar);
set(ax, 'YScale', 'log');
like image 107
Marc Avatar answered Sep 22 '22 00:09

Marc