필터 지우기
필터 지우기

Errorbar overlapping with the left and right border of a plot

조회 수: 4 (최근 30일)
Fan Yang
Fan Yang 2021년 10월 27일
댓글: Star Strider 2021년 10월 28일
a = [1,2,3,4;5,6,7,8]
errorbar(mean(a),std(a))
The two lines of code above generate an line of mean value with errorbars. However, the leftmost and the rightmost errorbar overlapped with the left and right border of the plot. Is there anyway to avoid it?

채택된 답변

Star Strider
Star Strider 2021년 10월 27일
Add an xlim (or axis) call —
a = [1,2,3,4;5,6,7,8]
a = 2×4
1 2 3 4 5 6 7 8
figure
errorbar(mean(a),std(a))
xlim(xlim+[-1 1]*0.2) % <— ADD THIS
Make appropriate changes to get the desired result.
.

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by