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

 Accepted Answer

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 Comments

I really appreciate you so much. As you said I remove ylim command and the problem is fixed.
Thank you so much.
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 ;)
Yes, I meant YTickLabel. Thank you so much again.

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Products

Release

R2020a

Tags

Asked:

BN
on 10 Sep 2020

Commented:

BN
on 11 Sep 2020

Community Treasure Hunt

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

Start Hunting!