Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Figure position - generates on wrong screen

Subject: Figure position - generates on wrong screen

From: Amanda

Date: 9 Nov, 2010 18:46:04

Message: 1 of 3

I have three monitors at my work station and when I'm working in MATLAB in my center screen (which is set as my primary screen in Windows), if I run a script that generates figures they come up in my right screen. Because they're not on the middle screen when MATLAB is open, I can't use getframe because it doesn't see it. Does anyone know if this is something I can fix in MATLAB or in Windows? I'm stumped!

Subject: Figure position - generates on wrong screen

From: Sean

Date: 9 Nov, 2010 19:19:04

Message: 2 of 3

"Amanda " <adegiorgi@nmic.navy.mil> wrote in message <ibc4tc$rm9$1@fred.mathworks.com>...
> I have three monitors at my work station and when I'm working in MATLAB in my center screen (which is set as my primary screen in Windows), if I run a script that generates figures they come up in my right screen. Because they're not on the middle screen when MATLAB is open, I can't use getframe because it doesn't see it. Does anyone know if this is something I can fix in MATLAB or in Windows? I'm stumped!


you can GET the monitor information like this

monitors = get(0,'MonitorPositions'); %root monitors

And then SET the position of the figure as necessary.
For more info:
docsearch monitorpositions

Subject: Figure position - generates on wrong screen

From: Walter Roberson

Date: 9 Nov, 2010 19:29:34

Message: 3 of 3

On 10-11-09 01:19 PM, Sean wrote:
> "Amanda " <adegiorgi@nmic.navy.mil> wrote in message
> <ibc4tc$rm9$1@fred.mathworks.com>...
>> I have three monitors at my work station and when I'm working in
>> MATLAB in my center screen (which is set as my primary screen in
>> Windows), if I run a script that generates figures they come up in my
>> right screen. Because they're not on the middle screen when MATLAB is
>> open, I can't use getframe because it doesn't see it. Does anyone know
>> if this is something I can fix in MATLAB or in Windows? I'm stumped!
>
>
> you can GET the monitor information like this
>
> monitors = get(0,'MonitorPositions'); %root monitors
>
> And then SET the position of the figure as necessary.
> For more info:
> docsearch monitorpositions

Also directly relevant to this question is the root property
'DefaultFigurePosition' which controls where figures go when no Position
property is specified at the time of their creation.

get(0,'DefaultFigurePosition')

will show you the current value.

Which monitor the figures show up in will depend on where the default figure
position is relative to the MonitorPositions.

It is not uncommon in Matlab versions for Windows to find that the default
figure position comes up on a monitor other than the main monitor.


Note that in order to change the DefaultFigurePosition permanently, you may
have to add set() call to your Matlab startup script.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us