how to specify y axis?
Mostra commenti meno recenti
Risposta accettata
Più risposte (1)
the cyclist
il 21 Giu 2020
set(gca,'YTick',[0 500 1000],'YTickLabel',[0 500 1000])
5 Commenti
Ibrahim AlZoubi
il 21 Giu 2020
the cyclist
il 21 Giu 2020
Modificato: the cyclist
il 21 Giu 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
il 21 Giu 2020
Ibrahim AlZoubi
il 21 Giu 2020
the cyclist
il 21 Giu 2020
rand(7)
was just me generating some random numbers to plot, to illustrate that my code suggestion worked in that case.
Categorie
Scopri di più su Matrices and Arrays in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

