How to draw shapes in uiaxes on app designer?
Show older comments
I need to put a square in the middle of my 100x100 uiaxes on app designer. I tried using
rectangle(‘Position’,[25,25,50,50])
But that just creates a new window when I click run. The shape needs to be in the axes.
Accepted Answer
More Answers (1)
Steven Kaplan
on 1 Apr 2019
Edited: Steven Kaplan
on 1 Apr 2019
1 vote
Has anyone successfully used the viscircles function in app designer? I am getting the following error:
Error using uistack (line 53)
Functionality not supported with figures created with the uifigure function. For more information, see Graphics Support in App Designer.
Error in viscircles (line 165)
uistack(thinCircHdl,'up');
5 Comments
Taqieddine Sbita
on 3 Apr 2019
I have the exact same issue.
I cannot get the circles to show on top of an image in the app designer.
Hasaan Ijaz
on 11 Aug 2020
Did you figure out how to show the circles on top of a uiimage?
arisha mehar
on 29 Aug 2020
Hey... i'm facing the same issue.. did u figure out thi issue or not...?
arisha mehar
on 29 Aug 2020
Or any alternate method u've used to visuaize circles? plzz tell me
Hasaan Ijaz
on 30 Aug 2020
Edited: Hasaan Ijaz
on 30 Aug 2020
I couldn't figure out how to use the viscircles but the rectangle function can do the same job.
By using the following for loop you will ensure that all detected circles are highlighted/filled
circlesize = 15;
cs = circlesize;
for i=1:max(size(centers))
rectangle('Parent', axisofinterest,'Position',[centers(i,:) -cs cs cs], 'Curvature',[1,1]);
end
This should work. You will obviously have to tweak the positioning parameters. Still, the viscircles is more desirable bcz its faster. If you figure out to incorporate viscircles, lemme know.
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!