logticks

版本 1.0.0.0 (3.1 KB) 作者: Yvan Lengwiler
logticks replaces the y-axis ticks of a logarithmic graph with the non-logarithmic values.
35.0 次下载
更新时间 2016/3/4

查看许可证

The program takes the exponential of the existing ticks. It then adjusts them to get a sequence of 'pretty numbers.' Because of this, the spacing is never perfectly uniform, and sometimes this non-uniformity can be undesirable. In those cases, it helps selecting a larger minimum decimal position, because this will allow the program to choose more uniformly spaced ticks on a narrower grid.
Examples:
t = 0:30; y = exp(-t*0.03 + randn(1,31)*0.2);
plot(t,log(y)); grid on; logticks()
figure; plot(t,log(y)); grid on; logticks(gca,2)
t = 0:50; y = 1e6 * exp(t*0.05 + randn(1,51)*0.2);
figure; plot(t,log(y)); grid on; logticks
figure; plot(t,log(y)); grid on; logticks([],[],1e-6)

引用格式

Yvan Lengwiler (2024). logticks (https://www.mathworks.com/matlabcentral/fileexchange/55762-logticks), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2015a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Grid Lines, Tick Values, and Labels 的更多信息
标签 添加标签

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0