The plot draws at y = -20, is there any way to force it to plot like normal (y=0)?
1 次查看(过去 30 天)
显示 更早的评论
Dear all,
I don't know why my plot starts plotting at -20!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/359005/image.jpeg)
Is there any way to plot it on the y=0?
Thank you
采纳的回答
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
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 ;)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!