Getting current coordinates of a figure

User: "RoKet"
Altair Employee
Updated by RoKet

Hi forum,

I'd like to create a figure next to another. In order to do this, I call

  pos = get(handles.mainWindow, 'position');

and create the new figure with

  handles.hSurf = figure(2, 'Name', 'New Figure', 'position', [pos(1)+pos(3) pos(2) pos(3) pos(4)]);

My problem: pos always has the coordinates with which the mainWindow was generated originally. But I want to have the coordinates of the current position of mainWindow (because I have moved it to another position).

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "RoKet"
    Altair Employee
    OP
    Updated by RoKet

    In the meantime, I noticed that it works in Compose, but not in Activate. I hope this will be fixed in one of the next releases.