MATLAB: How to highlight y=0 grid line in a 2D plot

2d plotgrid linehighlight

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.

Best Answer

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.)