필터 지우기
필터 지우기

Can I force Matlab to not place new figures on top?

조회 수: 51 (최근 30일)
Micke Malmström
Micke Malmström 2018년 5월 4일
댓글: Sean Phillips 2019년 5월 6일
I have some scripts that plots graphs and exports them with export_fig(...). the figures always pops up to "stay on top". Can i force Matlab to not place the new figures on top of other programs so that I can for example work in "MS Word" while the script runns in Matlab in the background?
(Note I have to use create new figuree and I dont want to use plot(axishandle,...) because I use functions I cannot edit.)

답변 (3개)

Ameer Hamza
Ameer Hamza 2018년 5월 4일
편집: Ameer Hamza 2018년 5월 4일
You can set the Visible property of figure object as 'off' at time of creation. They will not appear automatically
f = figure('Visible', 'off');
and then see them at the end using
f.Visible = 'on'; % or set(f, 'Visible', 'on');
For further details refer my answer to a similar question . You may find some useful information in the comments
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 5월 4일
The difficulty with this is that the user is using functions they cannot edit.

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2018년 5월 4일
No, unfortunately when figure() is used to activate a figure or to create a new figure, it is always going to be raised to the top.
Sometimes you can get away with
set(0, 'DefaultFigureVisible', 'off')
but that probably would not work with export_fig.
Sometimes you can get away with running MATLAB with -nodesktop and doing the graphing and saving without the graphs being enabled. That can depend upon the graphics features you use and upon the kind of file you are saving to.
  댓글 수: 2
Micke Malmström
Micke Malmström 2018년 5월 4일
if I use
set(0, 'DefaultFigureVisible', 'off')
Will "gcf" fetch the right figure?
Walter Roberson
Walter Roberson 2018년 5월 4일
Yes, gcf will work in that case.

댓글을 달려면 로그인하십시오.


Sean Phillips
Sean Phillips 2019년 5월 6일
편집: Sean Phillips 2019년 5월 6일
if you have dual monitor
  1. set your "side" monitor as the primary display under display properties in your OS
  2. run MATLAB in the "side" monitor and then run your scripts which may involve full figures popping up etc.
  3. do your other work on your second monitor (in my case my central large monitor). I will open Word, or web browsing or even undocked editor from MATLAB in my central monitor and it will remain on top and the focus will remain on that window at all times while MATLAB is running fullscreen popups in the "side" monitor.
This is what i do when i am creating structs in loops where i use framegrabber on fullscreen figures.
works on Win10 with triple monitors
  댓글 수: 1
Sean Phillips
Sean Phillips 2019년 5월 6일
you can also undock the command window and drag into another monitor while the primary display runs MATLAB with fullscreen figure pop-ups. This is useful for terminating the script while its running without having to get to the command window "underneath" the fullscreen figures while the script runs

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by