MATLAB: I need a hand with some graph function… :O

graphs

Is there a way to use the 'hold' command to keep only selected graphs and get rid of the others?
Thanks in advance

Best Answer

I am not certain what you want to do. You may not need to use hold at all.
Try this:
x = linspace(-1, 1);
figure(1)
L1 = line('XData',x, 'YData',2*x);
L2 = line('XData',x, 'YData',x.^2);
set(L1, 'LineStyle','none') % Using ‘set’
L1.LineStyle = 'none'; % Using Structure
grid