How do I prevent figure container from getting docked by default?
71 ビュー (過去 30 日間)
古いコメントを表示
First, I know how to undock and dock Matlab figures programmatically and how to set their default docking settings.
The problem I am encountering is with the Matlab figure that contains my docked figures. In the past when I docked figures it would open a new window outside of the main Matlab window and dock the figures there.
Lately, when I dock figures, it also docks the window that contains them.
Does anyone know how I can get the figure container to be undocked by default?
Below is the behavior I want: 1. figure(1) % Create blank figure 2. Press dock button in figure 3. Figure is docked OUTSIDE of main Matlab window
Thanks!
0 件のコメント
回答 (1 件)
prabhat kumar sharma
2025 年 1 月 22 日
Hello Bryce,
Certainly! To prevent MATLAB figures from docking inside the main window by default, you can set the default window style to 'normal'. Here's how:
1. Set Default Window Style:
set(0, 'DefaultFigureWindowStyle', 'normal');
2. For Individual Figures:
h = figure; % Create a new figure
set(h, 'WindowStyle', 'normal'); % Ensure it opens undocked
3. Check Preferences:
- Go to "Home" > "Preferences" > "MATLAB" > "Figures" and set the default to open figures in a separate window.
Adding these settings to your `startup.m` file ensures they apply every time MATLAB starts. This should help keep your figures undocked by default.
I hope it helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!