MATLAB: Add lines to plot

figureplotsubplot

Hey Guys, I have created a func. which plots me some Data. Inside my func. I use this code
Plot = figure
set(Plot, 'Position', [306,200, 1610,1085]);
set(Plot,'name','Plot','numbertitle','off');
my Question is now: how can I add more Plot lines without opening a new figure ?

Best Answer

if isempty( findobj('Tag','Plot')) == 1
Plot = figure
set(Plot, 'Position', [306,200, 1610,1085]);
set(Plot,'name','Plot','Tag','Plot','numbertitle','off');
else
MakeFigureCurrent = findobj('Tag','Plot')
figure(MakeFigureCurrent)
hold on
end
Some day I ll be a MatLabGOD...but not in this life