File Exchange Pick of the Week

Our best user submissions

Aligning Axes Labels

Jiro's picks this week are Align axes labels in 3D plot by Matthew Arthington and Tools for Axis Label Alignment in 3D Plot by Ligong Han.

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);

This topic was covered in a different blog "MATLAB Spoken Here" in this post. As you can see, this is a feature that has been around for a long time.

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.

Comments

Give these a try and let us know what you think here or leave a comment for Matthew or Ligong.




Published with MATLAB® R2015a

|
  • print

Comments

To leave a comment, please click here to sign in to your MathWorks Account or create a new one.