function growth_video(flshdate,time,t1,t2,minX,maxX,minY,maxY,maxZ,minE,maxE,minGrow,maxGrow,lmatime,lon,lat,alt,xlma,ylma,divtime,growthfig,growax,Eax,LMAax,growln,Eln,LMAln)

picname = ['growth_pics_',flshdate,'_',time,'-10ms_close','/growth_rate_lma_temp'];

%Plot Pulse Map
pulseax = subplot('Position',[0.56,0.1,0.39,0.8]);
xlabel('Longitude (km)','FontSize',24)
ylabel('Latitude (km)','FontSize',24)
set(gca,'FontSize',24)
hold on
EdgeList_old = [];
m=1;
% Istart = 16; % 20ms divs
Istart = 33; % 10ms divs
Iend = find(divtime<t2,1,'last');
Edges = cell(Iend-Istart,1);
for i = Istart:Iend
    Ifirst = find(lmatime>0,1,'first');
    Ilast = find(lmatime<divtime(i),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');
    %Plot new data
    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 new data
    Ifirst = find(lmatime>0,1,'first');
    Ilast = find(lmatime<divtime(i-1),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);
    nedges = length(EdgeList_old);
    for j = 1:nedges
        k = EdgeList_old (1, j) ;
        l = EdgeList_old (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]);
    EdgeList_old = EdgeList;
    delete(growln);
    delete(Eln);
    delete(LMAln);
    growln = plot(growax,[divtime(i) divtime(i)],[minGrow maxGrow],'Color','r','LineWidth',2);
    Eln = plot(Eax,[divtime(i) divtime(i)],[minE maxE],'Color','r','LineWidth',2);
    LMAln = plot(LMAax,[divtime(i) divtime(i)],[0 maxZ],'Color','r','LineWidth',2);
    savefig([picname,num2str(m)],growthfig,'png')
    im = imread([picname,num2str(m),'.png']);
    if m == 1
        [mov(:,:,1,m), map] = rgb2ind(im, 256, 'nodither');
    else
        mov(:,:,1,m) = rgb2ind(im, map, 'nodither');
    end
    Edges{m} = EdgeList;
    m=m+1;
end
hold off
%Save EdgeLists
save(['EdgeLists_',flshdate,'_',time,'.mat'],'Edges');
%Write gif
% imwrite(mov, map, strcat('growth_rate_',date,'_',time,'.gif'), 'DelayTime', 0.5, 'LoopCount', inf);
%Write avi
% makevideo(flshdate,time)

end