Combining the parts of these three , here is what I still have:
h = subplot(2,2,1);
line(1:10, rand(1,10));
set(h, 'buttondownfcn', ['h=gca; hc = copyobj(h, gcf);' ...
'set(hc, ''Units'', ''normal'',' ...
' ''Position'', [0.05 0.1 0.8 0.85],' ...
' ''buttondownfcn'', ''delete(gca)'');']);
It is not perfect, but it works.

Click on the axis:

Click on the extended axes and disappear:

, , " 3D" . " ", , . : , , . "" .
, . - , .
( uipanel, ), :
gcaExpand.m:
function gcaExpand
set(copyobj(gca, uipanel('Position', [0 0 1 1])), ...
'Units', 'normal', 'OuterPosition', [0 0 1 1], ...
'ButtonDownFcn', 'delete(get(gca, ''Parent''))');
end
gcaExpandable.m:
function gcaExpandable
set(gca, 'ButtonDownFcn', [...
'set(copyobj(gca, uipanel(''Position'', [0 0 1 1])), ' ...
' ''Units'', ''normal'', ''OuterPosition'', [0 0 1 1], ' ...
' ''ButtonDownFcn'', ''delete(get(gca, ''''Parent''''))''); ']);
end
. , . .
Matlab, . , .
subplot, gcaExpandable, , plot ButtonDownFcn ( , ). , NextPlot 'replacechildren', . , plot . , .