Why are there no minor ticks for my "semilog" plots in MATLAB 6.5 (R13)?

10 views (last 30 days)
Why are there no minor ticks for my "semilog" plots in MATLAB 6.5 (R13)?
I tried the following example in the documentation for the SEMILOGX and SEMILOGY functions:
x = 0:.1:10;
semilogy(x,10.^x)
However, there are no minor tick marks on the y-axis. I tried setting the "YMinorTick" property to "on", but this did not help.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Jul 2012
This is a bug in MATLAB 6.5 (R13) in the way that the "XMinorTick" and "YMinorTick" properties are displayed using the SEMILOGX and SEMILOGY functions. Our development staff is investigating this issue any may consider it in a future release of MATLAB.
Currently, to work around this issue, you must specify the spacing. In order for the minor tick marks to be displayed, the spacing on the "semilog" scale must be by decade. For example, you can specify the "YTick" property as follows:
set(gca, 'YTick', [10.^0 10.^1 10.^2 10.^3 10.^4 10.^5 10.^6 10.^7 10.^8 10.^9 10.^10])

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!