function tenPlotsDAEnhanced2(uFRET,uc,savePDF,part,fromto)
%%      MultiPlot 
%   corrected for $uc=2 (uncorrected $uc=1)
%   saves .pdf of every plot for $savePDF=1, if not set = 0
%   pages $fromto for specific pages
if nargin<5
    fromto(1,1)=1/10;
    fromto(1,2)=ceil(size(uFRET,2)/10);
    t=1;
end
if nargin<4
    Tstart(1,1)=1;
    part=0;
end



if nargin<3
   savePDF=0;
end

if nargin<2 
   uc=1;
end

if part==0
    pt=1;
elseif part==1
    pt=2;
    Tstart(1,1)=1;
elseif part==2
    pt=3;
    
end
    t=fromto(1,1)*10;
for s=fromto(1,1)*10:fromto(1,2)*10
   
    figure(s)
    
    for p1=1:10

        ende(1,1)=size(uFRET(uc,t).eff100,1);
        ende(2,1)=uFRET(1,t).A_bleached;
        ende(3,1)=size(uFRET(uc,t).eff100,1);
        xTix=[0,round(ende(pt)/4),ende(pt)-round(ende(pt)/4),ende(pt)];
        xTix(end)=ende(pt);
        xTixL=round(xTix/1000);
        yMax=max(max(uFRET(uc,t).ints100));
        xDbleach=uFRET(1,t).D_bleached;
        yDbleach=uFRET(1,t).eff100(uFRET(1,t).D_bleached,1);
        xAbleach=uFRET(1,t).A_bleached;
        yAbleach=uFRET(1,t).eff100(uFRET(1,t).A_bleached,1);
        Tstart(1,1)=1
        Tstart(3,1)=xAbleach-250;
        Tstart(2,1)=1;
        
        
        subplot(10,4,4*p1-3:4*p1-1)
            plotI=line(Tstart(pt,1):ende(pt),uFRET(uc,t).ints100(Tstart(pt,1):ende(pt),1:2));
        
                    text(xAbleach,yAbleach,'\bf{A} bleached \rightarrow','Rotation',33,'Fontsize',8, 'HorizontalAlignment','right');
                    text(xDbleach,yDbleach,'\bf{D} bleached \rightarrow','Rotation',33,'Fontsize',8, 'HorizontalAlignment','right');
        
        set(plotI(1),'Color',[0.431 0.612 0.522]);
        set(plotI(2),'Color',[0.894 0.525 0.612]);
        
        ax1 = gca;
        xyPos=get(ax1,'Position')-[0.09 0 -0.1 0];
              set(ax1, 'Position',xyPos,...
                   'YColor','b','YAxisLocation','left',...
                    'Color','none','xtick',[],...
                    'XLim',[Tstart(pt,1),ende(pt)],'YLim',[0,yMax]);
        if strcmp(uFRET(uc,t).names(1),'r')==1;
            set(get(ax1,'XLabel'),'String',...
                ['time in sec   #',num2str(t),' - ',uFRET(uc,t).names(7:9),uFRET(uc,t).names(17:20)])
        else
            set(get(ax1,'XLabel'),'String',...
                ['time in sec   #',num2str(t),' - ',uFRET(uc,t).names(1:2),uFRET(uc,t).names(11:14)])
        end

        if (uc==2)
            ylabel(ax1,'Intensities (cor)');
        else
            ylabel(ax1,'Intensities (uc)');              
        end
        
        ax2 = axes('Position',get(ax1,'Position')+[0.05 0 0.08 0],...
            'YAxisLocation','right',...
            'Color','none','XColor','k','YColor','k',...
            'xtick', xTix, 'XTickLabel', xTixL, 'XLim',[Tstart(pt,1),ende(pt)],...
            'YLim',[0,1.0],'YTick',[0,0.5,1],'YTickLabel',{'0';'50%';'100%'});

        line(1:ende(pt),uFRET(uc,t).eff100(1:ende(pt)),'Color','k','Parent',ax2);
        ylabel(ax2,'Efficiency')
        set(ax2,'Position',get(ax1,'Position'));
        
     

        subplot(10,4,4*p1)

        hist(uFRET(uc,t).eff100(Tstart(pt,1):ende(pt)),100,'EdgeColor',[0.55 0.17 0.08]);

        ax3=gca;
        xyhPos=get(ax3,'Position');
        xyhPos(1)=0.76; 
        xyhPos(3)=0.2;
        xyhPos(4)=0.065;
        set(ax3, 'Position', xyhPos,...
            'YAxisLocation','right','XAxisLocation','bottom',...
            'xtick', [], 'XTickLabel','','YLimMode','auto',...
            'YColor',[0.04 0.1 0.5],...
            'Color','none','YColor','k','Box','off',...
            'CameraUpVector', [-1,1,0],'XDir','reverse')
        axis tight
        maxCounts=get(ax3,'YLim');
        
        if p1==10
        ylabel(ax3,'counts','Rotation',[0],'Position',[-0.02,maxCounts(1,2),1],'fontweight','demi'); %#ok<NBRAK>
        %newCamera=get(gca,'CameraPosition')*[1 0 0;0 1 0;0 0 -1]   ...'CameraPosition',newCamera, ;
        end
        t=t+1;

    end
    maximize
    if savePDF==1
        if (uc==2)
            save2pdf(['CorFRET',num2str(s)],gcf,600)
        else
        save2pdf(['UncorFRET',num2str(s)],gcf,600)
        end
    else
    end
 end
end
