How to clear only a part of the plot
Show older comments
Hi! I have a figure with multi lines plotted in different steps. plot(a); hold on; plot(b); plot(c); plot(d);
I want to clear only the some of the plots and hold the rest.
delete plot(a) and plot(c)
cfl will remove all. Any solution to this? thanks.
Accepted Answer
More Answers (1)
This will actually delete the line objects from the axes:
ah = plot(...);
hold on
bh = plot(...);
ch = plot(...);
delete(ah)
delete(ch)
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!