axescheck
Extract an axes handle from an argument list.
📝Syntax
[ax, args, nargs] = axescheck(arg1, arg2, ...)
📥Input Arguments
Parameter Description
arg1, arg2, ... an argument list, as passed to a plotting function.
📤Output Arguments
Parameter Description
ax the axes handle found in the list, or [] if none was given.
args the remaining arguments, as a cell array.
nargs the number of remaining arguments, numel(args).
📄Description

axescheck is a helper for plotting functions. It returns a leading axes handle in ax (or [] when the first argument is not an axes), with the remaining arguments in args. A 'Parent', value pair anywhere in the list also supplies the axes and is removed from args.

💡Examples
ax = axes();
[cax, args, nargs] = axescheck(ax, 1, 2)
🔗See Also
gcaisgraphics
🕔Version History
Version Description
2.0.0 Initial version.
Edit this page on GitHub