rectangle invisible in matlab
5 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
Turlough Hughes
2021-8-18
The following works for me:
roi.Visible = 'off';
2 个评论
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')
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!