필터 지우기
필터 지우기

Problem with drawpolygon in GUI

조회 수: 10 (최근 30일)
Christoffer Johansson Westheim
Christoffer Johansson Westheim 2022년 8월 18일
답변: Githin George 2023년 10월 5일
Hi,
I have a GUI with two axes in it where I use drawpolygon to generate a roi in one of the axes. This has worked fine in Matlab 2020a, but after upgrading to Matlab 2022a I can draw the polygon, but I can no longer modify it. I have noticed that the surf that the polygon is drawn on top of changes "resolution" - bocomes less smooth - when I start drawing and think the problem is associated with the h.draw function.
I have tried the drawpolygon in a regular figure and there is works as expected so it seems associated with the axes in the GUI.
Anyone knows how to work around?
Regards,
Christoffer

답변 (1개)

Githin George
Githin George 2023년 10월 5일
Hello Christoffer,
In order to modify the ROI polygon once you create it using “drawpolygon” function in MATLAB R2022a, you can try changing the ‘Layer’ property to ‘front’ as a workaround for the issue.
roi = drawpolygon(handles.axes,'Layer','front');

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by