myfigure - extension of MATLAB's figure

版本 1.0 (361.3 KB) 作者: Oleg Iupikov
Creates figure window with extra options, non-overlapping placement of multiple figures, and profile management.
12.0 次下载
更新时间 2023/8/8

查看许可证

myfigure
Creates figure window with extra options, non-overlapping placement of multiple figures, and profile management.
Overview
The function myfigure is an extention built on top of MATLAB's figure function, which allows:
  • figure creation on the user-specified monitor (in multi-monitor systems)
  • automatic placement of new figure next to the existing one to avoid their overlapping;
  • optionally, if there are many figures, new figures can be placed on multiple monitors;
  • automatic setting of the figure size same as the previous figure, or manual size setting;
  • specifying distance between figures ("gaps") and distance to the screen borders ("margins");
  • creating axes: single or tiled layout (uses MATLAB's tiledlayout);
  • setting axes properties;
  • executing user-defined functions after creating the figure or axes on it;
  • disabling the figure's menu bar and tool bar;
  • setting standard figure properties;
  • saving all above to a profile, and create new figures with desired behaviour by just specifying the profile name;
  • selection of existing figure by a text label.
Documentation and examples
For the full function documentation, see attached Live Script and demo files.
After defining figure profiles once (see demo2_generate_banner_case.m), one can just use them as
myfigure(size=[800 400]);
myfigure(profile="demo_profile_with_axes");
myfigure(profile="demo_profile_3D_plots_1x2");
myfigure(profile="demo_profile_with_axes_2x3");
This will create the following non-overlapping figures on the screen:

引用格式

Oleg Iupikov (2024). myfigure - extension of MATLAB's figure (https://www.mathworks.com/matlabcentral/fileexchange/133447-myfigure-extension-of-matlab-s-figure), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2023a
与 R2021b 及更高版本兼容
平台兼容性
Windows macOS Linux
标签 添加标签

Community Treasure Hunt

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

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