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

New to MATLAB?

Thread Subject:
Problem locating figures on secondary monitor

Subject: Problem locating figures on secondary monitor

From: Dave

Date: 2 Dec, 2010 09:23:04

Message: 1 of 2

I am seeking help on an apparently buggy feature in Matlab 2010b which affects placement of figures on a secondary monitor.

The documentation for the MonitorPositions root object property indicates the following:
    [x y width height;x y width height]

    Width and height of primary and secondary monitors, in pixels. Contains the width and height of each monitor connnected to your computer. The x and y values for the primary monitor are 0, 0 and the width and height of the monitor are specified in pixels.

    The secondary monitor position is specified as:

    x = primary monitor width + 1
    y = primary monitor height + 1
Experimentally, I get the following result, which does not match the above:
ans =
           1 1 1440 900
        1441 -303 3360 896

My first monitor is 1440 x 900, and my second is 1920x1200. There are three discrepancies I see:
(1) when I place a figure in the lower left corner of the secondary monitor, it reports its location (using get(FigHandle,'Position') ) as [1441 1 FigWidth FigHeight] instead of [1441 -303 FigWidth FigHeight]
(2) the -303 and 896 values change if I position my secondary monitor differently with respect to the first (using XP's Display Properties => Settings)
(3) the 3360 number is the sum of the widths of the monitors, not the width of the second monitor.

I would like to reliably tile the secondary monitor with figures, but this behavior doesn't inspire confidence. I can envision an empirical workaround, but I am pretty sure it will break when the bug eventually gets fixed, or maybe even when I try running on a different OS.

Anyone wrestle with this one yet? Any advice on the best way to go?



PS I am running Matlab 2010b on Windows XP.

Subject: Problem locating figures on secondary monitor

From: Aurelien Queffurust

Date: 2 Dec, 2010 10:26:04

Message: 2 of 2

Hi dave,

See this bug report:
Incorrect values for MonitorPosition and the ScreenSize on dual monitor systems


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