How do I prevent figure container from getting docked by default?
66 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
prabhat kumar sharma
am 22 Jan. 2025
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 Kommentare
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!