How to highlight y=0 grid line in a 2D plot
19 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Bhaskar Ravishankar
le 12 Mar 2020
Commenté : Bhaskar Ravishankar
le 13 Mar 2020
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 commentaires
Réponse acceptée
Walter Roberson
le 12 Mar 2020
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.)
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Labels and Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!