Is there a way to actually create figures in matlab and keep them minimized in the taskbar?
I know I can use
h=figure;
set(h, 'Visible', 'off');
but in this way in the taskbar there is no figure icon.
I simply like to plot something but keep it minimized in the taskbar: how can I do it?
Matlab doesn't have built-in functions to do this, so the second best thing to do would be to use Java.
This is plucked straight from Undocumented Matlab:
plot(1:10);
jFrame = get(handle(gcf),'JavaFrame');
pause(0.1) %//This is important
jFrame.setMinimized(true);
The pause
is necessary because you'd otherwise get a NullPointerException
because of the fact that the window hasn't been fully drawn yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With