MATLAB: How to get handles of the line object

findobjhandlelineMATLABobject

How do we get handles of the line objects in a figure?

Best Answer

We can use the "findobj" function.
h = findobj(gca,'Type','line');