Figure origin incorrectly set

3 views (last 30 days)
Steve on 19 Aug 2013
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.

Answers (1)

Daniel Shub
Daniel Shub on 19 Aug 2013
A few years ago TMW did not officially support multiple monitors. I have never read anything to suggest that anything has changed.
  1 Comment
Steve on 19 Aug 2013
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.

Sign in to comment.


Find more on Graphics Object Properties 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!