logticks
Version 1.0.0.0 (2.22 KB) by
Richie Cotton
Calculates tick marks at appropriate points for log-scale plots.
The default behaviour of MATLAB for log scale plots is to give tick marks only at powers of 10. Where the data varies by only a factor of less than 10000, there aren't enough tick marks to be useful. LOGTICKS calculates tick marks at k*10^j, where k can be in {1,2,5}, {1,2}, or simply {1} over a requested range.
The output is given as a structure with two fields: a vector of tick locations, and a cell array of labels for the ticks.
Please see the picture for an example of its use.
Cite As
Richie Cotton (2026). logticks (https://uk.mathworks.com/matlabcentral/fileexchange/11563-logticks), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R14SP3
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > 2-D and 3-D Plots > Line Plots > Log Plots >
- MATLAB > Graphics > Labels and Styling > Axes Appearance > Limits, Ticks, and Grids > Grid Lines, Tick Values, and Labels >
Find more on Log Plots in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
