Home > matlab > Matlab figure disappears in multiple monitor setup

Matlab figure disappears in multiple monitor setup

June 17th, 2017

I have multiple monitors attached to my laptop. Whenever I want to create a new figure in MatLab, the main screen seems to flash once and the figure is nowhere to find.

The reason is the DefaultFigurePosition property. If you run

get(0,'DefaultFigurePosition')

You probably will find the values are out of your screen, and that’s exactly the reason. For example, on my computer the first value (left) is negative, and 2nd value (bottom) is too large.

The solution is to use the following command

set(0,'defaultfigureposition',[680 278 560 420])

You don’t want to manually run the above command everytime you run MatLab. So you can put the command to the startup.m file, which is located in \toolbox\local\startup.m

Author: Xu Cui Categories: matlab Tags:
Try Stork, a research tool we developed

Stork is a publication alert app developed by us at Stanford. As a researcher we often forget to follow up important publications - and it's practically impossible to search many keywords or researchers' names everyday. Stork can help us to search everyday and notifies us when there are new publications/grants. How Stork helped me?

About the author:

Xu Cui is a human brain research scientist in Stanford University. He lives in the Bay Area in the United States. He is also the founder of Stork (smart publication alert app), PaperBox and BizGenius.

 

He was born in He'nan province, China. He received education in Beijing University(BS), University of Tennessee (Knoxville) (MS), Baylor College of Medicine (PhD) and Stanford University (PostDoc). Read more ...
  1. No comments yet.
CAPTCHA Image