The plot draws at y = -20, is there any way to force it to plot like normal (y=0)?

조회 수: 1 (최근 30일)
BN
BN 2020년 9월 10일
댓글: BN 2020년 9월 11일
Dear all,
I don't know why my plot starts plotting at -20!
Is there any way to plot it on the y=0?
Thank you

채택된 답변

Adam Danz
Adam Danz 2020년 9월 10일
편집: Adam Danz 2020년 9월 10일
We don't have nearly enough information to understand what's causing those results.
Shots in the dark include.
  • You're using the BaseValue property of the bar() function to vertically offset the bar plot downward. The solution would be to remove that name-value pair or set its value to 0.
  • The y-tick labels have been set such that they no longer correspond to the actual y-ticks. The solution would be to stop setting the YTickLabel property of the axes.
  • Those are patch objects whose vertices are correctly mapped into the axes. If the place of the patch is unexpected, the solution would be to correct the patch vertices.
  댓글 수: 3
Adam Danz
Adam Danz 2020년 9월 10일
I don't know how ylim would have caused that problem. Maybe you meant YTickLabel?
I'm glad my shot in the dark was helpful ;)
BN
BN 2020년 9월 11일
Yes, I meant YTickLabel. Thank you so much again.

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by