figtagged

版本 1.0.0.0 (1.7 KB) 作者: Daniel J. Auger
Return the handle to a figure with a specified tag
189.0 次下载
更新时间 2013/2/12

查看许可证

figtagged is a MATLAB function that makes it easy to refer to figures using text 'tags' rather than numeric figure handles. This is particularly useful when creating figures from scripts, since you often want to re-use a window between runs. (The usual alternatives are closing all the windows, which loses positioning and layout, and hard-coding figure numbers, which can interact badly with other scripts and functions.)

You can tag figures in MATLAB already, but this function makes it a bit more convenient.

Usage:

h = figtagged('thetag') returns a handle to a figure window with the 'Tag' property set to 'thetag'. If there is already a figure window with the specified tag, it will be cleared and reused; otherwise, a new figure is made.

Examples:

figtagged('mytag');
hFig = figtagged('mytag2');

引用格式

Daniel J. Auger (2024). figtagged (https://www.mathworks.com/matlabcentral/fileexchange/40284-figtagged), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2012b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Function Handles 的更多信息
标签 添加标签

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0