How to reduce the number shown on the Y axis?
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Tony Cheng
il 5 Feb 2017
Modificato: Star Strider
il 5 Feb 2017
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160405/image.jpeg)
Hi guys,
We can see that 0 , 20 , 40 , 60 and 80, totally 5 numbers on the Y axis in this figure.
But they are no distance between them, making the figure not pleasing to the eyes.
I do not want to reduce the size of the numbers, because this size fits the layout of a paper to be written.
What could I do to reduce the number shown on the Y axis? For instance, I want to
show 0 , 40 and 80 on the Y axis.
Thanks so much!
0 Commenti
Risposta accettata
Star Strider
il 5 Feb 2017
Modificato: Star Strider
il 5 Feb 2017
You can set the number of y-ticks and their values with the 'YTick' and 'YTickLabel' properties, as well as the 'FontSize' property. Use the set function to change them to be as you want them. See the documentation for Axis Properties (link) for details.
EDIT — Corrected typographical error.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Annotations in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!