File Exchange

image thumbnail

Let me work, figure!

version (1.13 KB) by Rafael Oliveira
Fig replaces the built-in figure without stealing your focus. Setting properties is also available.

1 Download

Updated 29 Nov 2011

View License

For everyone that needs to plot something in a long loop, and still wants to use the computer in meanwhile, without new figures stealing your keyboard focus and disrupting your work-flow, this file emulates the built-in figure command, but if the desired figure handle already exists, it will just set it as the current figure, without making it visible or on top of other windows.

It's the same as issuing a set(0,'CurrentFigure',h) command, but encapsulated using the same syntax as figure.


fig(456, 'Name', 'Figure Title');
h = fig('Name', 'New figure');
fig(h, 'Name', 'New Name');

Cite As

Rafael Oliveira (2021). Let me work, figure! (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)


Brett Israelsen

Great! Easy to use. One suggestion: put your license information in fig.m. That way people can just include the file in their project without having to associate the license too.

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

Inspired by: "Smart"/Silent Figure

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!