Negative data ignored in adding errorbars to plot with logarithmic y axis
조회 수: 1 (최근 30일)
이전 댓글 표시
I have two sets of data which I am trying to plot with error bars. When I plot the data, the error bars do not plot fully (see image).
"Warning: Negative data ignored"
Here are my data sets:
x=2:8;
y1=[84 4.5e3 3.1e4 5.3e4 1.1e5 1.05e5 6.5e3];
y2=[.22 .07 .14 .2 .07 .02 .27];
y1stderr=[.28 410 7.7e3 3.4e5 4.15e4 5.5e4 3.1e5];
y2stderr=[0.24 .15 .14 .08 .23 .28 .18];
figure
hold on
plot(x,y1,'b',x,y2,'r')
errorbar(x,y1,y1stderr,'b')
errorbar(x,y2,y2stderr,'r')
set(gca,'YScale','log')
axis([0, 8, .001, 500000])

I imagine the problem is with plotting an imaginary component of the errorbar. How do I get around this?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Errorbars에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!