How can we draw a customizable rectangular ROI on an axes using AppDesigner?
Mostrar comentarios más antiguos
Hello,
I need to draw a customizable rectangular ROI on an axes in AppDesigner:
I tried this in AppDesigner:
h = drawrectangle(app.FullImageUIAxes, 'Position', [25,25,50,50], 'LineWidth', [2], 'Color', [1 0 0]);
But I get this error: ROI parent must be a valid Axes object.
I know the axes reference is correct.
Next I tried:
h = drawrectangle(app.FullImageUIAxes, 'Parent', app.UIFigure, 'Position', [25,25,50,50], 'LineWidth', [2], 'Color', [1 0 0]);
But I get the same error.
How should the axes be referenced when using drawrectangle in AppDesigner?
Respuesta aceptada
Más respuestas (1)
Sean de Wolski
el 30 de Oct. de 2019
In 19b, this works on a uiaxes as well.
drawrectangle(uiaxes)
1 comentario
Guojin Feng
el 31 de Oct. de 2019
Excellent ! Great feature to have.
Categorías
Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!