logticks

logticks replaces the y-axis ticks of a logarithmic graph with the non-logarithmic values.
35 Downloads
Aktualisiert 4 Mär 2016

Lizenz anzeigen

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)

Zitieren als

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

Kompatibilität der MATLAB-Version
Erstellt mit R2015a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Grid Lines, Tick Values, and Labels finden Sie in Help Center und MATLAB Answers
Tags Tags hinzufügen

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0