I just updated to Matlab 2018b (9.5.0.94444444) and I have come across a weird glitch when changing a plot axis scaling to logarithmic, from linear. I haven't come across this problem before in previous versions, but I haven't found a solution to this maddeningly simple problem. Here's an example that highlights the issue I see:
figure(1)ha1 = subplot(2,1,1);plot(1:10,linspace(1,100,10))ha1.XDir = 'reverse';title(ha1,'Linear axis scaling: no problem')ha2 = subplot(2,1,2);plot(1:10,linspace(1,100,10))ha2.XDir = 'reverse';ha2.XScale = 'log';title(ha2,'X-axis log-scaled: tick direction problem')
Now with ha2, the x- and y-axes behave contrastly when setting:
ha2.TickDir = 'in';% or 'out'
Changing TickDirMode to "manual" or "auto" has no affect.
Any help is appreciated. Thanks.
Best Answer