Figure origin incorrectly set

조회 수: 3(최근 30일)
Steve 2013년 8월 19일
I understand there are some bugs in Matlab 2010 with respect to MonitorPositions. This may be related. I am using multiple displays with Mac OS 10.6.8 and Matlab 7.10.0.
1 0 1080 1898
5561 818 1920 1080
7481 818 1920 1080
3641 698 1920 1200
1081 458 2560 1440
The first monitor [1 0 1080 1898] is set as the system default monitor. Attempting to position on the system default monitor fails:
set(gcf,'position',[1 0 5000 1000])
1081 1 5000 1000
The figure is always positioned at the start of the "second" monitor ([1081 458 2560 1440]). Perhaps this is related to the jumbled order of screens in the monitorpositions output?
Additionally, I honestly don't understand the Macintosh description for monitorpositions here.
MATLAB on Macintosh systems recognize only the main monitor. The position data is of the form [x,y,width,height-menuHieght]... The main monitor is determined by which display has the menu bar.
If Matlab only recognizes the main monitor, why do I get expected output with monitorpositions, and if the main monitor defines the origin, why is the origin not set by the main monitor?
I should note that if I attempt to set the gcf positions again, it works as expected, but if and only if I type the command manually. It will not work when being called with a .m file.


Daniel Shub
Daniel Shub 2013년 8월 19일
A few years ago TMW did not officially support multiple monitors. I have never read anything to suggest that anything has changed.
  댓글 수: 1
Steve 2013년 8월 19일
Interesting. So, it's included but not officially supported. I might experiment with reordering the plugs into the video cards to see if that affects the order of the monitors returned by MonitorPositions. If so, I might be able to kludge something that way.
Thanks for the thoughts.

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


Find more on Desktop 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!

Translated by