MATLAB: How to plot from a line array

lineplot

I'm indexing several lines in a line array as such:
h(i) = plot(B, sim/max(sim));% i = integer
Is there a function that is sort of the reverse of delete(h(i))?
I'm trying to add certain lines to figures together pulling from an array of several lines.
EDIT:
Basically I am looking for a way to easily replot lines that I have already plotted without having to use the plot() function and set the linewidths and colors, etc. all over again. I have found that indexing my lines in a line array has been helpful for removing certain plots by using delete(h), but I haven't found a way to re-add them onto figures after deleting.

Best Answer

Note that what you get out of plot are handles to the lines, not the line objects themselves. In normal circumstances the difference doesn't matter, but if you call delete(h) you destroy the underlying line object and you're left with a handle to an object that is no more. At this point, there's no way to restore it.
If the underlying object still exist (i.e. you haven't deleted it explictly with delete or implicitly by destroying its parent axes (e.g. with a new plot or by closing the figure), you can copy it in a new parent with copyobj.