Getting current coordinates of a figure

RoKet
RoKet
Altair Employee
edited February 2021 in Community Q&A

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).

Answers

  • RoKet
    RoKet
    Altair Employee
    edited February 2021

    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.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.