|
Jochen Deibele <jmdeibele@gmx.de> wrote in message <i7fb8o$ajs$1@orkan.itea.ntnu.no>...
> Hi!
>
** snip **
I understand your point in the overhead of axes/figures etc....
You could expand the second method by:
function gui_Test
figure ( 'KeyPressFcn', {@CloseMeOrHideMe} );
plot ( [1 2 3], rand.*[2 3 4] )
figure ( 'KeyPressFcn', {@CloseMeOrHideMe} );
plot ( [1 2 3], rand.*[2 3 4] )
figure ( 'KeyPressFcn', {@CloseMeOrHideMe} );
plot ( [1 2 3], rand.*[2 3 4] )
end
function CloseMeOrHideMe ( obj, ~ )
switch get (obj, 'CurrentKey' )
case 'v'
set ( obj, 'visible', 'off' )
otherwise
close ( obj );
end
end
%%%
Ofcourse you will have to turn back on your figures later, you can do this by "figure(#)" and it will either re-visualise your plot or create an empty figure.
|