Erase many layers of a plot, leave the background
1 回表示 (過去 30 日間)
古いコメントを表示
I use the rectangle function to draw colored bounding boxes on top of an image containing text. I would like to be able to remove the bounding boxes and draw new ones without having to recreate the entire plot. Is there a way to do that? I saw a post about doing this with a single layer (<http://www.mathworks.com/matlabcentral/answers/1444-clear-one-plot-in-multiple-hold-figure)>, but that doesn't seem scalable to many layers.
Example code:
imshow(I);
c = colormap(jet);
for i = 1:x
% Plot the bounding boxes
for j = 1:y
rectangle('Position', pos, 'EdgeColor', c(j, :));
end
% Clear boxes, leave background image
end
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!