Tanks in advance!
It is not clear to me why you think you would have to copy point by
point?
alllines = findobj('Type',line');
nlines = length(alllines);
thepoints = cell(nlines,2);
for K = 1:nlines
thepoints{K,1} = get(alllines(K),'XData');
thepoints{K,2} = get(alllines(K),'YData');
end
What happens after this depends on the structure of your plot and
how much of that structure you want to preserve.
This code depends upon your plot being composed of lines, not surfaces
or patches or contours... you didn't say.
--
"The beauties of conception are always superior to those of
expression." -- Walter J. Phillips