Why does LOGLOG not show logarithmic minor ticks in Y direction in MATLAB 7.13 (R2011b)?

16 views (last 30 days)
I am creating a logarithmic plot using LOGLOG as in the following example:
x = logspace(-1,2);
loglog(x,exp(x),'-s')
grid on
%%%END CODE
I would expect both X-axis and Y-axis to show logarithmic scaling in the minor ticks, but it appears the Y-axis is spaced using a linear scale.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 30 Jul 2012
This is expected behavior. Logarithmic minor ticks are only visible within range of a decade, i.e. between 10^0 und 10^1, between 10^1 and 10^2 and so forth. If the range of the between adjacent major ticks spans multiple decades the minor ticks are spaced with a fixed distance. Referring to the example the major ticks are representing 10^10 to 10^50 and there are multiple decades between the major ticks so there is simply not enough space to visualize the minor ticks in this example.
However we can see the logarithmic scale in minor ticks when zooming into one decade:
axis([0.1 10 10 10^4])

More Answers (0)

Products


Release

R2011b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!