How can I control the format of the tick label numbers when using a log YScale with a large range?
Mostrar comentarios más antiguos
I am trying to produce plots with a log Y-axis scale and with non-exponential format numbers (e.g., 1000, not 10^3) as labels for the Y ticks. This works with narrow Y-axis ranges but not wide ones, as is illustrated in the following example (using all positive Y values in quite reasonable ranges):
X = 1:10;
Y = (11:20)*100;
for ymin=400:-100:100
figure;
plot(X,Y);
axis([0 10 ymin 2200]); % set xmin xmax ymin ymax
ax = gca;
ax.YAxis.Exponent = 0
ax.YScale = 'log';
end
Figures 1 and 2 have non-exponential Y tick labels, which is what I want, but Figures 3 and 4 have labels like 10^2.
So, my question is, how can I force MATLAB to produce non-exponential Y tick labels regardless of the range of the Y axis?
Thanks for any suggestions.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Axis Labels en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!