How can we draw a customizable rectangular ROI on an axes using AppDesigner?
Mostra commenti meno recenti
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?
Risposta accettata
Più risposte (1)
Sean de Wolski
il 30 Ott 2019
In 19b, this works on a uiaxes as well.
drawrectangle(uiaxes)
1 Commento
Guojin Feng
il 31 Ott 2019
Excellent ! Great feature to have.
Categorie
Scopri di più su Develop Apps Using App Designer in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!