How to clear only a part of the plot
77 views (last 30 days)
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.
0 Comments
Accepted Answer
KSSV
on 26 Jul 2018
figure
hold on
h1 = plot(rand(10,1)) ;
h2 = plot(rand(10,1)) ;
h3 = plot(rand(10,1)) ;
h4 = plot(rand(10,1)) ;
set(h2,'Visible','off')
set(h4,'Visible','off')
1 Comment
See Also
Categories
Find more on Graphics Object Properties 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!