SEMILOGY not printing proper y axis labels
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am creating 4 total plots, 2 per figure, using the same data; the first plot is a regular plot (using subplot and plot commands in MatLab R2013b); the second plot is a semilogy plot of the same data (using subplot and semilogy commands).
When I look at the results of the regular figure, I have a plot in real space that ranges from about 0 to 24 on the y axis, for both the top and bottom plots.
When I look at the results of the semilogy figure, I have a plot in real space that appears to be the right shape, but the y axis labels are wrong on both plots; there is only one label, midway up the y axis, with a value of 1 (ie, 10^0) on both plots. There are two problems with this: first, with only one label, it is difficult to determine the actual spacing; second, the plot should have a marking for at least 10^1 (ie, 10) as well, since I know the function has a value of at least 10.
I am using set(gca, 'YScale', 'log') already, as was indicated by another person's question, but that is not working; my results are the same regardless of whether I use that command.
How do I get the axis labels to display properly?
0 Kommentare
Antworten (1)
Wayne King
am 28 Okt. 2013
Without the data, it's difficult to say exactly what is going on, but can you just set the yticks?
y = 0.1:0.5:24;
semilogy(y)
set(gca,'ytick',[10^-1 10^0 10^1])
0 Kommentare
Siehe auch
Kategorien
Mehr zu Axis Labels finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!