How can I add errorbars to a log-log plot?

조회 수: 10 (최근 30일)
alex tsamo
alex tsamo 2018년 8월 6일
답변: dpb 2018년 8월 6일
I have tried the function errorbar but I could not plot at the log scale. This function work correctly but not in my case. The result I get is "Warning: Negative data ignored" and the resulting graph is attached below. The error bars should also decrease as x increases, something that is not happening. Can somebody help please? Either with a different function or the same one. Thank you in advance!

답변 (1개)

dpb
dpb 2018년 8월 6일
Well, what is the log() of a negative value supposed to be?
You didn't show the values so we can't tell but clearly value-err is <0 for at least one point and that just can't be represented on a log axis. That's not the fault of the errorbar function and nothing can fix it other than changing the data.
As for visual appearance clearly the last two that are both positive are decreasing; they probably are numerically doing that for the others as well but error>value so value-error<0 as noted for the others.
Fix that and your problems will go away...

카테고리

Help CenterFile Exchange에서 Errorbars에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by