フィルターのクリア

Is there any way to selectively remove lines from a plot?

27 ビュー (過去 30 日間)
Tim Mottram
Tim Mottram 2012 年 7 月 23 日
Hi, I have an axes, I plot 100 lines on it then load some more data and plot another 100 lines. Is there a way of removing only the last 100 lines from the plot? Thanks in advance :)

採用された回答

Titus Edelhofer
Titus Edelhofer 2012 年 7 月 23 日
Hi,
the easiest way is to store the handles you plot, e.g.
hPlot = zeros(100, 1);
for i=1:100
hPlot(i) = plot(someDataX, someDataY);
end
When you are unhappy with the (additional) data you plotted:
delete(hPlot);
removes them again and you can try again ...
Titus
  1 件のコメント
Tim Mottram
Tim Mottram 2012 年 7 月 23 日
Worked like a charm, Thanks Titus :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVisual Exploration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by