Effacer les filtres
Effacer les filtres

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

27 vues (au cours des 30 derniers jours)
Tim Mottram
Tim Mottram le 23 Juil 2012
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 :)

Réponse acceptée

Titus Edelhofer
Titus Edelhofer le 23 Juil 2012
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

Plus de réponses (0)

Catégories

En savoir plus sur Visual Exploration dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by