how to specify y axis?
Afficher commentaires plus anciens
Réponse acceptée
Plus de réponses (1)
the cyclist
le 21 Juin 2020
set(gca,'YTick',[0 500 1000],'YTickLabel',[0 500 1000])
5 commentaires
Ibrahim AlZoubi
le 21 Juin 2020
the cyclist
le 21 Juin 2020
Modifié(e) : the cyclist
le 21 Juin 2020
Here is a simple example that shows that this syntax works:
figure
plot(1000*rand(7))
set(gca,'YTick',[0 500 1000],'YTickLabel',[0 500 1000])

Perhaps you are doing something afterward that changes it? Maybe you could post the code that creates your figure.
Ibrahim AlZoubi
le 21 Juin 2020
Ibrahim AlZoubi
le 21 Juin 2020
the cyclist
le 21 Juin 2020
rand(7)
was just me generating some random numbers to plot, to illustrate that my code suggestion worked in that case.
Catégories
En savoir plus sur Graphics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

