When you create a plot, you probably notice a bunch of buttons in the toolbar.
These buttons have been around for a very long time, so you probably have gotten used to these powerful features. They allow you to quickly explore your data in different ways, i.e. by zooming, panning, and rotating.
But did you know that you could combine these interactive tasks with programmatic tasks? For example, you could make MATLAB tell you the current X and Y limits every time you zoom.
plot(rand(10,1)) h = zoom; h.ActionPostCallback = @(o,e) disp(axis);
The two File Exchange submissions by Matthew and Ligong are perfect for combining with this feature for 3D rotation. They allow for automatic alignment of axes labels when you rotate the figures. Matthew's submission came first. It works well and has a lot of good reviews. One limitation was that it only worked with equal aspect ratio and orthographic projection. Ligong was inspired by this and created a version without this limitation.
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.