align_axis_labels

align_axis_labels(ax)

ALIGN_AXIS_LABELS Rotate a 3-D axes’ x/y labels parallel to their axes

Usage:

align_axis_labels(ax)

Inputs:

ax : axes handle - 3-D axes to align (default: gca)

Outputs:

none (side effects only)

Notes

HG2 (R2014b+) draws 3-D axis labels horizontally; this restores the pre-HG2 behavior of laying the x and y labels parallel to their projected axis edges, using axis_screen_angle for the on-screen angles. View and limit listeners keep the labels aligned through interactive rotation and zoom; call again after resizing the axes (the pixel aspect changes the angles slightly). Call once per axes – repeated calls stack duplicate listeners. The z label is left alone (already vertical).

Example

surf(peaks(30)); view(140, 42); align_axis_labels(gca);

See also: axis_screen_angle, scaleline, view, xlabel

∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿