%% Find All Line Objects in Current Axes
% Create a plot of random values, and then return all line objects in the current axes.

plot(rand(5))
h = findobj(gca,'Type','line')

% Use h to query the y values of the first Line object.

values = h(1).YData

% Copyright 2020 The MathWorks, Inc.