pilabels
- picks reasonable limits and ticks
- uses latex for pretty fractions if necessary
- replaces old labels produced by previous calls
- does NOT autocorrect on zoom/pan/resize
algorithm:
- choose limits as smallest n such that pi/n < x_data_range
- optional: increase n to next smallest "round" number
- "round" means "power of 2" right now; could be a*b^n with a<b, 2^a*3^b, etc
- choose step size as smallest d that ensures at least L tick marks
I'm sure there are plenty of bugs
Cite As
Alan B (2024). pilabels (https://www.mathworks.com/matlabcentral/fileexchange/27010-pilabels), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > Formatting and Annotation > Axes Appearance > Limits, Ticks, and Grids > Grid Lines, Tick Values, and Labels >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.