undecorateFig removes the border, title bar, menu bar and toolbar of a Matlab figure.
redecorateFig restores the figure to its previous (decorated) state.
undecorateFig(hFig) % hFig is a figure handle or any other GUI handle (default: current figure)
This code heavily relies on undocumented and unsupported Matlab functionality. It is expected to work on Matlab 7 and higher, but use at your own risk!
Yair, Great work. However, if I create an edit box, edit box won't work anymore after I used undecorateFig function to the GUI.
Note this is reversible: You can also *add* the bar to the top after you remove it, which is necessary if you need to drag or resize the figure window. It works great on R2018a.
So simple to use. So useful.
Excellent function ! The good thing for my launcher too ! (Matlab R2015b => the tag of the axes of the figure disappear after the opening of the GUI but not a problem)
I have wondered so many times how to create an undecorated figure (for a launcher figure for example), so thanks for this code !!
Very nice piece of code!!! I've been looking at this for a long time for my splash screens.
Removed annoying Matlab warning that "figure JavaFrame property will be obsoleted in a future release"
Inspired by: getjframe - Retrieves a figure's underlying Java frame, enable/disable entire figure window, setFigTransparency - set figure transparency / fading, blurFigure - blurs and prevents interaction on a figure window
Create scripts with code, output, and formatted text in a single executable document.