How do I prevent figure container from getting docked by default?
63 次查看(过去 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!