How do I dock figures next to the editor by default ?

223 views (last 30 days)
Emre
Emre on 1 Jun 2025
Commented: Jaime on 11 Dec 2025 at 13:34
set(0,'DefaultFigureWindowStyle','docked') does not work. It still opens the figure in a new windows an I have to right click and click on "Dock figures". Alternatively I can press CTRL+Shift+D but I dont want to do that. Typing get(0,'DefaultFigureWindowStyle') gives me "docked" as an answer so the command is working appearently.
How can I make it so the figure appears next to the editor by default without me pressing CTRL+Shift+D everytime ?
  4 Comments
Addy
Addy on 5 Jun 2025
Can confirm as well. the docking does not work.
I tried (0,'DefaultFigureWindowStyle','docked')
and set(groot,'DefaultFigureWindowStyle','docked')
This is in 2025a and normal mflies.
I put this figure config in startup.m.
But 2025a just refuses to work.
AZEDDINE
AZEDDINE on 6 Oct 2025
Try using the flags from inside the figure command :
figure('Name', fig_title, 'Position', 'WindowStyle', 'docked');

Sign in to comment.

Answers (1)

Adam Danz
Adam Danz on 2 Jun 2025
Edited: Adam Danz on 16 Jun 2025
Starting in MATLAB R2025a, figures created by the figure command appear by default in a figure containter.
The set(groot,'DefaultFigureWindowStyle','docked') command controls whether figures are docked to the figure container.
In the upper right of the figure container is an option to dock the figure container to the desktop.
When docked to the desktop, the figure container is docked next to the editor by default, if the editor is opened.
Future figures generated by the figure command within the same session will appear in the docked figure container unless the WindowStyle is set to Docked or if the figure container is undocked.
  9 Comments
Nishan Pokhrel
Nishan Pokhrel on 9 Dec 2025 at 0:44
yeah its pretty annoying, especially when it was possible in previous versions. seems like vibe coding is getting pretty popular on all fronts of technology...
Jaime
Jaime on 11 Dec 2025 at 13:34
Also adding my sentiment that this is a pretty frustrating removal of a feature that I rely upon to set up my editor.

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products


Release

R2025a

Community Treasure Hunt

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

Start Hunting!