File Exchange

image thumbnail


version 1.1 (2.56 KB) by

Automatically replaces xticklabels with rational multiples of pi.



View License

- 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

- 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

Comments and Ratings (3)

Chris FUNG

Chris FUNG

Jonas Lundgren

Jonas Lundgren (view profile)

I like this! It would be nice if the y-labels got the same font. Some parameters should be arguments, e.g. FONT_SIZE and MIN_TICKS.



added tags

MATLAB Release
MATLAB 7.4 (R2007a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today