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

27 次查看(过去 30 天)
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Visual Exploration 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by