How to increase yticklabel?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dear experts,
I have this plot as shown below. I need to increase yticklabel more than 4 I used many ways to do it but still stuck at 4
way1
yticks(1:0.5:5);
yticklabels({'1','1.5','2','2.5','3','3.5','4','4.5','5'})
way2
YTick = 1:0.5:5;
set(gca,'ytick',YTick, 'yTickLabel', strsplit(num2str(YTick)))
The yticklabel doesn't change into what I added! any idea how to fix it?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1220612/image.jpeg)
2 commentaires
Réponse acceptée
Dyuman Joshi
le 6 Déc 2022
Change the y-limits
ylim([1 5])
%or more than 5, whatever value is preferable
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Axis Labels 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!