function [EdgeList lmatimetemp xlmatemp ylmatemp alttemp] = growth_pic(time,tflash1,tflash2,minX,maxX,minY,maxY,lmatime,lon,lat,alt,xlma,ylma,divtime)

% picname = ['growth_pics_',flshdate,'_',time,'/growth_rate_lma_temp'];

%Plot Pulse Map
pulseax = subplot('Position',[0.51,0.15,0.39,0.8]);
% pulseax = subplot('Position',[0.15,0.1,0.8,0.4]);
xlabel('Longitude (km)','FontSize',24)
ylabel('Latitude (km)','FontSize',24)
set(gca,'FontSize',24)
hold on
%Plot new data
Ifirst = find(lmatime>0,1,'first');
Ilast = find(lmatime<tflash2,1,'last');
lmatimetemp=lmatime(Ifirst:Ilast);
lontemp=lon(Ifirst:Ilast);
lattemp=lat(Ifirst:Ilast);
xlmatemp=xlma(Ifirst:Ilast);
ylmatemp=ylma(Ifirst:Ilast);
alttemp=alt(Ifirst:Ilast);
lmatimeSAM = lmatimetemp + 3600*str2double(time(1:2))-60*str2double(time(3:4));
Data = [lmatimeSAM lattemp lontemp alttemp];
[EdgeList, ~, ~] = PulseGraph_new ('input',Data,'quiet');
nedges = length(EdgeList);
for j = 1:nedges
    k = EdgeList (1, j) ;
    l = EdgeList (2, j) ;
    x1 = xlmatemp (k) ;
    x2 = xlmatemp (l) ;
    X = [ x1 x2 ] ;
    y1 = ylmatemp (k) ;
    y2 = ylmatemp (l) ;
    Y = [ y1 y2 ] ;
    plot (pulseax,X, Y, '-r', 'LineWidth', 1) ;
end
%Plot old data
Data = [];
EdgeList = [];
Ifirst = find(lmatime>0,1,'first');
Ilast = find(lmatime<tflash1,1,'last');
lmatimetemp=lmatime(Ifirst:Ilast);
lontemp=lon(Ifirst:Ilast);
lattemp=lat(Ifirst:Ilast);
xlmatemp=xlma(Ifirst:Ilast);
ylmatemp=ylma(Ifirst:Ilast);
alttemp=alt(Ifirst:Ilast);
lmatimeSAM = lmatimetemp + 3600*str2double(time(1:2))-60*str2double(time(3:4));
Data = [lmatimeSAM lattemp lontemp alttemp];
[EdgeList, ~, ~] = PulseGraph_new ('input',Data,'quiet');
nedges = length(EdgeList);
for j = 1:nedges
    k = EdgeList (1, j) ;
    l = EdgeList (2, j) ;
    x1 = xlma (k) ;
    x2 = xlma (l) ;
    X = [ x1 x2 ] ;
    y1 = ylma (k) ;
    y2 = ylma (l) ;
    Y = [ y1 y2 ] ;
    plot (pulseax,X, Y, '-k', 'LineWidth', 1) ;
end
xlim([minX maxX]);
ylim([minY,maxY]);
set(gca,'YTickLabel',{'-25','-20','-15','-10','-5',''})
text((maxX-minX)*0.45+minX,(maxY-minY)*0.96+minY,'PulseGraph','FontSize',40);

end