undecorateFig - remove/restore figure border and title bar

Removes/restores the border and title bar of legacy (Java-based) Matlab figures

http://undocumentedmatlab.com/articles/frameless-undecorated-figure-windows

You are now following this Submission

Description:
  • undecorateFig removes the border, title bar, menu bar and toolbar of a legacy (Java-based) Matlab figure.
  • redecorateFig restores the figure to its previous (decorated) state.
Syntax:
undecorateFig(hFig) % hFig is a figure handle or any other GUI handle (default: current figure)
redecorateFig(hFig)
Technical details:
Warning:
  1. This only works with legacy (Jav-based) figures, not the new (web-based) uifigures. For this reason, it will not work for any figure on R2026a+, nor with uifigures in earlier Matlab releases (created via the uifigure function or the App Designer tool).
  2. 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 (2026). undecorateFig - remove/restore figure border and title bar (https://uk.mathworks.com/matlabcentral/fileexchange/50111-undecoratefig-remove-restore-figure-border-and-title-bar), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release to R2025b

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.1.0

Clarified description to indicate this only works with legacy Java figures, not the new uifigures. No code was modified.

1.1.0.0

Removed annoying Matlab warning that "figure JavaFrame property will be obsoleted in a future release"

1.0.0.0