letter_label¶
- letter_label(fig_h, ax_h, labstr, labdir, fontsize, gaps)¶
LETTER_LABEL Add a figure-label letter annotation next to an axis
- Usage:
lab_handle = letter_label() lab_handle = letter_label(fig_h, ax_h, labstr, labdir, fontsize, gaps)
- Inputs:
fig_h : figure handle (default: gcf) ax_h : axes handle (default: gca) labstr : char - label text (default: ‘A’) labdir : char - ‘left’/’l’ or ‘right’/’r’ side of the axis (default: ‘l’) fontsize : double - font size (default: 30) gaps : 1x2 double - [vertical horizontal] gaps in normalized units (default: [.01 .01])
- Outputs:
lab_handle : annotation handle for the textbox
Notes
The glyph box is measured once with FitBoxToText and then frozen, so the label can be positioned by its actual size and clamped to stay on the figure – a label above an axis near the figure top previously drew upward off-screen. Measuring requires one drawnow at creation.
Example
letter_label(gcf, gca, ‘B’, ‘left’, 25);
See also: annotation, outertitle
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿