필터 지우기
필터 지우기

Plotting Poissonian Error Bars

조회 수: 5 (최근 30일)
jgillis16
jgillis16 2015년 8월 18일
댓글: Star Strider 2015년 8월 19일
I am inputting poissonian error bars on a plot I drafted. The only problem is that there are numerous points on the graph, therefore numerous associated error bars. This makes the graph look messy as well as unreadable. Would there be anyway to extrapolate the vertical distance each bar has from the line of the plot itself and plot the two vertical extremes of the error bars as separate 'curves' on the plot instead of individual error bars?
Code is below:
YYYYA = sort(YYYY, 'ascend');
S = sqrt(YYYYA);
figure(9)
plot(XX2, YYYYA, errorbar(XX2,YYYYA,S))

채택된 답변

Star Strider
Star Strider 2015년 8월 18일
I’m not sure what ‘S’ is, but I assume it is one extreme of your symmetric error limits. To plot error _bands) above and below your principal plot, use the hold function:
figure(9)
plot(XX2, YYYYA) % Data
hold on
plot(XX2, YYYYA+S) % Upper Error Band
plot(XX2, YYYYA-S) % Lower Error Band
hold off
This is obviously untested code.
  댓글 수: 2
jgillis16
jgillis16 2015년 8월 19일
Such a simple solution. Thanks again Strider!
Star Strider
Star Strider 2015년 8월 19일
My pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by