Figure origin incorrectly set

3 Ansichten (letzte 30 Tage)
Steve
Steve am 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.
get(0,'monitorpositions')
ans=
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])
get(gcf,'position')
ans=
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. http://www.mathworks.com/help/matlab/ref/rootobject_props.html
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.

Antworten (1)

Daniel Shub
Daniel Shub am 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. http://www.mathworks.co.uk/matlabcentral/answers/3910#comment_7916
  1 Kommentar
Steve
Steve am 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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by