|
@@ -0,0 +1,62 @@
|
|
|
+
|
|
|
+% selx=423:624;
|
|
|
+selx=451:601;
|
|
|
+bx=(-500:500)/50;
|
|
|
+col1=.1*[1 1 1];%[.0 .6 .6];
|
|
|
+col2=[255 175 3]/255;%[77 255 255]/255;%[255 195 77]/255;%[225 54 255]/255;%[255 110 238]/255;[0 .63 .54];
|
|
|
+col3=[255 0 0]/255;%[106 77 255]/255;%[77 255 106]/255;%[.60 .65 .0];%[77 255 106]/255;%[0 1 1]*.9;
|
|
|
+xxx=gacc(:,selx);
|
|
|
+mxxx=nanmean(xxx);
|
|
|
+sxxx=nanstd(xxx)/2;
|
|
|
+hold on;
|
|
|
+
|
|
|
+
|
|
|
+[AX,H1,H2]=plotyy(bx(selx),nanmean(gacc(:,selx)),bx(selx),[nanmean(gfr{1}(:,selx))' nanmean(gfr{2}(:,selx))']);
|
|
|
+uistack(AX(1), 'top')
|
|
|
+
|
|
|
+set(AX(1),'Color','none')
|
|
|
+set(AX(1),'FontName','Arial');
|
|
|
+set(AX(2),'FontName','Arial');
|
|
|
+if th==0
|
|
|
+ th=nanmean(nanmean(gfr{2}(:,[423:450 600:624])));
|
|
|
+ th=.5*round(th/.5);
|
|
|
+end
|
|
|
+if fct==0
|
|
|
+ fct= (nanmean([max(nanmean(gfr{2}(:,selx))) max(nanmean(gfr{1}(:,selx)))])-th)/max(mxxx);
|
|
|
+end
|
|
|
+set(H1,'LineWidth',1);set(H2,'LineWidth',2);
|
|
|
+set(H1,'LineStyle','--','Color',col1);
|
|
|
+ set(H2(1),'Color',col2)
|
|
|
+set(H2(2),'Color',col3)
|
|
|
+if axlim==0
|
|
|
+ axlim=1.01*[1.15*min(mxxx-sxxx) max(mxxx+sxxx)];
|
|
|
+end
|
|
|
+axs=-1000:100:1000;
|
|
|
+set(AX(1),'YLim',axlim);
|
|
|
+set(AX(1),'YLim',axlim); %axlim=get(AX(2),'YLim');
|
|
|
+set(AX(1),'YTick',axs);
|
|
|
+set(AX(1),'XTick',-3:1:3);
|
|
|
+set(AX(2),'YLim',axlim*fct+th-0.0);%[6.332 10]);
|
|
|
+set(AX(2),'YTick',6:11);
|
|
|
+set(AX(1),'XLim',[-1 2]);
|
|
|
+set(AX(2),'XLim',[-1 2]);
|
|
|
+set(AX(1),'box','off');
|
|
|
+set(AX(1),'YColor','k');
|
|
|
+set(AX(2),'YColor',col3);
|
|
|
+AX(1)=reg_plots(AX(1));
|
|
|
+AX(2)=reg_plots(AX(2));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+AX_annotations = copyobj(AX(1),get(AX(1),'Parent'));
|
|
|
+A=area(AX_annotations,bx(selx),[mxxx-sxxx; 2*sxxx]');
|
|
|
+set(A(1),'Visible','off');
|
|
|
+set(A(2),'FaceColor',col1+(1-col1)*.8);
|
|
|
+set(A(2),'EdgeColor','none');
|
|
|
+uistack(AX_annotations, 'bottom');
|
|
|
+set(AX_annotations,'Color',[1 1 1]);
|
|
|
+set(AX_annotations,'XTick',[],'YTick',[]);
|
|
|
+dsp=diff(axlim)/200*120;
|
|
|
+ set(AX(1),'dataaspectratio',[1 dsp 1]);
|
|
|
+ set(AX(2),'dataaspectratio',[1 dsp*fct 1]);
|
|
|
+ set(AX_annotations,'dataaspectratio',[1 dsp 1]);
|