필터 지우기
필터 지우기

rectangle invisible in matlab

조회 수: 8 (최근 30일)
Alan
Alan 2021년 8월 18일
댓글: Alan 2021년 8월 18일
Hi all,
I draw a rectangular in a figure by the code,
roi = drawrectangle('color','r','linewidth',2);
And now I want to set the rectangular invisible, so I code like this:
H = findobj(handles, 'type','rectangle');
set(H,'visible','off');
But this code does not work at all.
Could anyone help me to figure it out?
Thanks so much.

채택된 답변

Turlough Hughes
Turlough Hughes 2021년 8월 18일
The following works for me:
roi.Visible = 'off';
  댓글 수: 2
Turlough Hughes
Turlough Hughes 2021년 8월 18일
similarly, you can use the object (already assigned to roi) with the set function as follows:
set(roi,'Visible','off')
Alan
Alan 2021년 8월 18일
Thanks for your answer. It works well.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Yongjian Feng
Yongjian Feng 2021년 8월 18일
Try this:
H = findobj('Type', 'images.roi.rectangle');
  댓글 수: 1
Alan
Alan 2021년 8월 18일
Thanks for your answer.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by