![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/324115/image.png)
How can I set the y tick interval (to powers of 10) on a log scale?
53 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Heidi Hirsh
il 30 Giu 2020
Commentato: Heidi Hirsh
il 30 Giu 2020
I have specified the limits of my x and y axis which are both on log scales. I want to also specify the intervals for the yaxes so that the intervals match across subplot (even if the scales are different). I am running into issues since the interval size is not consistent on a log scale...
I have attached the plot I currently get. I would like to have y labels at each whole number power of 10.
0 Commenti
Risposta accettata
the cyclist
il 30 Giu 2020
Like this?
N = 500;
x = sort(1e3*rand(N,1));
y = sort(1e6*rand(N,1));
figure
loglog(x,y)
set(gca,'XLim',[1e1 1e4],'XTick',10.^(1:4), ...
'YLim',[1e3 1e6],'YTick',10.^(3:6))
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/324115/image.png)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Axis Labels in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!