MATLAB: How to use the tag/name/handle of a axes rather than gca

axeshandletag

Can I use the tag/name/handle of a axes rather than gca

Best Answer

You can use findobj to find axes with a given tag (as far as I know, there's no name property for axes)
hax = findobj(groot, 'Type', 'axes', 'Tag', yourtag);
But best would be to store in a variable the handle of the axes when you create it, avoiding having to search for it entirely.