Controlling MATLAB figure pop up location?

45 views (last 30 days)
Linpeng
Linpeng on 17 Mar 2013
Answered: Philip Rund on 7 Dec 2020
Hi, I am working under Ubuntu, using MATLAB 2012a. I am working on other projects (on desktop A of Ubuntu) while running MATLAB to do some experiments (on desktop B of Ubuntu).
The thing is that the program will constantly pop up a new figure showing the status of the experiments. The figures will pop up in my current desktop (desktop A), interrupting my work. I would like to see these figures to check the status of the experiment, but can I configure MATLAB to show the figures in which MATLAB GUI is located (desktop B) instead my current desktop?
Thanks.

Answers (2)

Linpeng
Linpeng on 17 Mar 2013
I will answer this question myself. Docking the figure pretty much solves my problem.
Just run
set(0,'DefaultFigureWindowStyle','docked')
And the figure window will be docked in MATLAB main GUI instead of popping up.

Philip Rund
Philip Rund on 7 Dec 2020
I had the same issue. Setting negative values (or higher positive values depending on which direction your second monitor/desktop is located) for the figure position worked for me:
figure('Position',[-1000 -1000 1200 500])
The first two numbers are the figure's position on your screen(s) and the second two are the size of the figure

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!