Set rbbox() to use figure axes in gui

6 visualizaciones (últimos 30 días)
Devin Alberti
Devin Alberti el 22 de Oct. de 2018
Comentada: Devin Alberti el 22 de Oct. de 2018
I would like to have rbbox() use the axes set in a figure window inside my gui. Every time I go to use the rbbox() function it uses the coordinate system of the entire gui frame rather than the active figure. I cannot use button press/release because I require the rbbox to have a fixed point relative to the figure axes which is set by the user. For instance rbbox([x, y, 0, 0], [x, y]) where x and y are the fixed rectangle point relative to the figure in the gui.
  2 comentarios
Jan
Jan el 22 de Oct. de 2018
What exactly is a "gui frame" and what do you mean by "active figure"? What does "I cannot use button press/release" mean? Does "relative to the figure axes" mean the figure or the axes?
Maybe rbbox is not the right tool. What about a dragrect?
Devin Alberti
Devin Alberti el 22 de Oct. de 2018
Gui frame is the window in which the gui is layed out on. when I set rbbox to have a fixed point at [0,0] it sets it at the bottom left point of the window rather than the axes in the gui.
Active figure I just mean the axes in the gui in which my images appear on.
press/release is how the matlab example for using rbbox() get the coordinates in terms of the axes. It uses rbbox() as just a visual indicator and saves the press and release point of the mouse in terms of the axes coordinates.
Relative to the figure axes is the axes I guess, just saying both because the axes changes depending on the figure placed in it through the imagesc() command.
Dragrect will not work because I need the corner to be fixed at a particular spot which dragrect does not do. rbbox has the ability to do this just it uses the coordinate system of the gui window and not the axes in the gui.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by