image thumbnail

subplotnumber

version 1.0.0.0 (3.62 KB) by Marc Jakobi
For the numbering of subplots in the top left corner.

37 Downloads

Updated 05 Oct 2016

View License

SUBPLOTNUMBER: For the numbering of subplots in the top left corner.
[For more than one subplot]
Syntax: h = subplotnumber;
numbering in the default format
(a),(b),... returns handle-array h.

h = subplotnumber(format)
numbering in user defined format. Returns
handle-array h.
e. g. h = subplotnumber('(A)');
or h = subplotnumber('1');

subplotnumber
default numbering without output

subplotnumber(format)
user defined numbering without output

subplotnumber('delete')
removes all numbering created by this
function

subplotnumber(format, [xp, yp])
subplotnumber([xp, yp])
adjustment of the position of the numbering

[For single axes (no subplots)]
Syntax: h = subplotnumber(number)
numbering with the string
'number' (outputs Text-Handle h)
e. g. h = subplotnumber('(b)');
or h = subplotnumber('2');

subplotnumber(number)
numbering with the string
'number' (no output)

subplotnumber(number, [xp, yp])
manual adjustment of the position

subplotnumber('delete')
removes all subplotnumbers created with
this function

Input arguments:
- format: Format of the numbering (string)
Supported formats:
- (a) - DEFAULT
- a
- (A)
- A
- (1)
- 1
Cursive and bold numbering can be added by adding:
\it (cursive) or \b (bold) to the format string.
e. g. format = '\it(a)';
format = '\ba';

- number: (in case of single axes) numbering to add to axes (string),
e. g. '(b)'
Cursive and bold numbering can be added by adding:
\it (cursive) or \b (bold) to the format string.
e. g. number = '\it(a)';
number = '\ba';

optional inputs:
- xp: x position (normalized) of the placement of the
subplotnumber
- yp: y position (normalized) of the placement of the
subplotnumber
Input as [xp, yp], a 1x2-double!

Output arguments (optional):
- h: Handle array of the placed text objects.
Ech text object is given the tag: 'subplotnumber'.

Hint:
By typing:
h = findobj(gcf,'Tag','subplotnumber');
subplotnumbers can be extracted from a figure.

Author: Marc Jakobi - 22.01.2016

Cite As

Marc Jakobi (2021). subplotnumber (https://www.mathworks.com/matlabcentral/fileexchange/59495-subplotnumber), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!