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?
try
h = errorbar(x,y,ebar);
set(get(h,'Parent'), 'YScale', 'log')
or
ax = axes();
errorbar(ax, x,y,ebar);
set(ax, 'YScale', 'log');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With