I am attempting to use findobj to retrieve text objects in a plot. For some reason, this fails (R2018a,b). In the following example, I expect to retrieve handles to the axis labels, but it doesn't work.
>> plot(1:5); xlabel X; ylabel Y >> H=findobj(gcf, '-property','Interpreter')H = 0×0 empty GraphicsPlaceholder array.
No other property search seems to work either:
>> H=findobj(gcf, '-property','String')H = 0×0 empty GraphicsPlaceholder array.>> H=findobj(gcf, 'Type','Text')H = 0×0 empty GraphicsPlaceholder array.
Does anyone know why findobj fails when used this way?
Best Answer