GUI to close all open figures except those selected
Version 5.0.0 (594 KB) von
Peter Seibold
GUI to close all open figures except those selected
This program is helpful if you have experiments in Matlab that open on every run many figures. The program displays all open figures in a table. You can select which figures shall be closed or not.
The code is tested with Matlab R2016a and R2020a.
The table contains the figure number/handle and the figure names of all figures. If the figure number/handle is displayed as ‘0’ in column 1, the number could not be retrieved.
The figures not to be closed shall be marked in the ‘Keep’ check boxes.
The checkbox “Force to keep figs with handle visibility 'off' or 'callback' ” is checked by default. It prevents normally that GUI figures are deleted. Uncheck this, if you want to change their ‘Keep’ status.
You may sort the table if you click on a column header.
A click in a table row activates the corresponding figure and also opens invisible figures.
Click on button 'close figures' closes all not marked figures.
After having new figures, move the mouse into ‘CloseFigures’ in order to refresh the table. All figures, which were previously checked as ‘keep’, are marked again as 'keep'.
The button “arrange figures” will arrange the figures in a gridded layout on the second monitor. If the second monitor does not exist, the primary monitor is used.
Hint: Put the ‘CloseFigures’ folder in your Matlab path or insert it as an app, see readme.pdf, second page.
Demo:
Run ‘Demo_makeFigures.m’ to create many figures.
Run ‘CloseFiguresVx.m’ and delete figures as desired.
The file ‘Demo_makeFigures.m’ is not required for ‘CloseFigures’ and may be deleted.
Zitieren als
Peter Seibold (2021). GUI to close all open figures except those selected (https://www.mathworks.com/matlabcentral/fileexchange/61974), MATLAB Central File Exchange. Retrieved February 26, 2021.
Kompatibilität der MATLAB-Version
Erstellt mit
R2016a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
5.0.0 | Implemented button to arrange all figures in a gridded layout |
||
4.0.0 | Open figure did not work with R2020a, fixed. |
||
3.0.0 | New layout. Refresh table on mouse move. |
||
2.0.0.0 | New release for Matlab R2016 and also older versions.
|
||
1.1.0.0 | removed a bug |
||
1.0.0.0 |