IntensitiesAverFin{jjj} = get_representative_intensities(ContrastFigure);\r
\r
% Figure with average intensity, without the bands with hole and meter\r
- figure\r
- imshow(ContrastFigure)\r
- hold on\r
- plot(IntensitiesAverFin{jjj},'-y','linewidth',2)\r
- hold on\r
+ f = figure();\r
+ ax = axes(f);\r
+ imshow(ContrastFigure, 'Parent', ax)\r
+ hold(ax, 'on');\r
+ plot(ax, IntensitiesAverFin{jjj},'-y','linewidth',2)\r
if jjj>=startFile+step %subtracts the intensities\r
plot(IntensitiesAverFin{jjj-step},'Color',[0.9290 0.6940 0.1250],'linewidth',2)\r
hold on\r
[Height(1,jjj),pkH]=max(pk);\r
qH=lk(pkH);\r
Metr_fit_H(1,jjj)=polyval(polypar_Metr,qH);\r
- plot(qH,-Height(jjj),'or','linewidth',2)\r
+ plot(ax, qH, -Height(jjj), 'or', 'linewidth', 2)\r
elseif jjj>=startFile+step\r
if waytrend<=0;\r
[pk,lk] = findpeaks(-IntensitiesAverFin_2{jjj}(1:(LevelPixels+30))); %10\r
qH=lk(pkH);\r
Metr_fit_H(1,jjj)=polyval(polypar_Metr,qH);\r
end\r
- plot(qH,Height(jjj),'om','linewidth',2)\r
+ plot(ax, qH, Height(jjj), 'om', 'linewidth', 2)\r
end\r
\r
elseif D_num==2\r
[Height(1,jjj),pkH]=max(pk);\r
qH=LevelPixels+lk(pkH);\r
Metr_fit_H(1,jjj)=polyval(polypar_Metr,qH);\r
- plot(qH,-Height(jjj),'or','linewidth',2)\r
+ plot(ax, qH, -Height(jjj), 'or', 'linewidth', 2)\r
elseif jjj>=startFile+step\r
if waytrend<=0;\r
[pk,lk] = findpeaks(-IntensitiesAverFin_2{jjj}(LevelPixels:end)); %10\r
qH=NaN;\r
Metr_fit_H(1,jjj)=NaN;\r
end\r
- plot(qH,Height(jjj),'om','linewidth',2)\r
+ plot(ax, qH, Height(jjj), 'or', 'linewidth', 2)\r
end\r
end\r
\r
Metr_fit_B(1,jjj)=NaN; % For 1-4 files\r
qB=NaN;\r
end\r
- plot(qB,Bottom(jjj),'ob','linewidth',2)\r
+ plot(ax, qB, Bottom(jjj), 'ob', 'linewidth', 2)\r
else\r
if D_num==1\r
LevelPixels=MeterScale(1+(1000-LevelNum(1,jjj))/100); % x level in pixels in the original image\r
qB=NaN;\r
Metr_fit_B(1,jjj)=NaN;\r
end\r
- plot(qB,Bottom(jjj),'oc','linewidth',2)\r
+ plot(ax, qB, Bottom(jjj), 'oc', 'linewidth', 2)\r
elseif D_num==2\r
LevelPixels=MeterScale(1); % x level in pixels in the original image\r
if waytrend<=0;\r
qB=NaN;\r
Metr_fit_B(1,jjj)=NaN;\r
end\r
- plot(qB,Bottom(jjj),'oc','linewidth',2)\r
+ plot(ax, qB, Bottom(jjj), 'oc', 'linewidth', 2)\r
end\r
end\r
\r
clear ContrastFigure\r
clear ContrastFigureFin\r
% clear IntensitiesAverFin\r
-\r
end % jjj, Cycles for figures files\r
\r
hf4=figure ('Name','Velocity','NumberTitle','off','PaperSize',[8.5 6],'PaperUnits','centimeters');\r