File Exchange

image thumbnail

undecorateFig - remove/restore figure border and title bar

version (31.8 KB) by Yair Altman
Removes/restores the border and title bar of Matlab figures


Updated 20 Mar 2015

View License

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)

Technical details:

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!

Cite As

Yair Altman (2020). undecorateFig - remove/restore figure border and title bar (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

Mingfeng Li

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"

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux