Why does my log plot use ticks with fractional exponents in MATLAB?
1 次查看(过去 30 天)
显示 更早的评论
Why does my log plot use ticks with fractional exponents in MATLAB 6.0 (R12) and later versions?
When I create a log plot that spans less than one decade, it sometimes uses tick marks with fractional exponents. This is not an industry standard, and is unexpected.
This worked fine in MATLAB 5.3.1 (R11.1), and also works fine in some cases, which is why I think it's a regression bug:
figure
subplot(1,2,1)
title('ticks are fine')
y=linspace(.1,.11,10);
semilogy(y)
subplot(1,2,2)
title('ticks have fractional exponents')
y=linspace(1.0,1.1,10);
semilogy(y)
I would expect the data to always show full decades.
采纳的回答
MathWorks Support Team
2009-6-27
This is a possible bug in MATLAB 6.0 (R12) and later versions. It has been reported to our development staff to be investigated for a future release of MATLAB.
As a workaround, you can set the axes limits manually using the AXIS command. The following is an example:
figure
y=linspace(1.0,1.1,10);
semilogy(y)
axis([0 10 0 10])
For more information, type "doc axis" or "help axis" (without the quotes) at the MATLAB prompt.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axis Labels 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!