How to highlight y=0 grid line in a 2D plot
26 次查看(过去 30 天)
显示 更早的评论
Hello,
I have several plots with both positive and negative Y values. I want to highlight the 0-crossing line (0-grid line) on the Y-Axis of these plots.
I searched the property inspector to change grid line properties but I did not find anything specific for this.
I have attached a sample of the graph I get. Please help. Thank you.
0 个评论
采纳的回答
Walter Roberson
2020-3-12
You can use yline() from R2018b or later. For older releases you can use refline()
You might want to uistack() the line to below the other objects.
You will not find a property to highlight a particular grid line (other than in the sense that you could turn off the other grid lines, so by default the remaining one would be visible.)
更多回答(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!