image thumbnail

Naming figures (fig.m)

version (1.64 KB) by Aslak Grinsted
Create new figures with a window title which can be used as a handle.


Updated 03 Sep 2013

View License

This function works just like the figure command in MATLAB except that you reference figures by names instead of figure handles. (you can still use the handles though)

H=fig('My figure')

The title of the window of the figure will now be 'My figure'. You can also set figure properties with the same call:

fig('My figure','renderer','opengl');

It will also place the figure window on the monitor with the current mouse position.

Cite As

Aslak Grinsted (2021). Naming figures (fig.m) (, MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

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

Start Hunting!