MATLAB: Make a figure a parent of text

axesparentpixelstext;

I am trying to programatically show text on my figure but the position is relative to the current axes in the figure (I have 4 axes in the figure. When I try to set the position of the text in pixels, its relative to the bottom left corner of the axes, not the bottom left corner of the figure. Figure is not a valid parent of the text command. Is there a work around? Here is what I have:
text1=text('units', 'pixels', 'Position', [0 0], 'String', 'Some string');
Thanks in advance.

Best Answer

Or define an axes, which has the same size as the figure and is invisible:
AxesH = axes('Units', 'normalized', 'Position', [0,0,1,1], 'visible', 'off', ...
'YLimMode', 'manual', 'YLim', [0, 1], ...
'XTick', [], 'YTick', [], ...
'NextPlot', 'add', ...
'HitTest', 'off');
text(10, 10, 'Hello', 'Units', 'pixels', 'VerticalAlignment', 'bottom', ...
'Parent', AxesH);