%% PlotTool!

%reshapeing
ttt=size(time_log,2)-1;
time_log=time_log(1:ttt);
p_downhole=p_downhole(:,1:ttt);
%flow=flow(:,1:ttt);
GOR=GOR(:,1:ttt);
w_in=w_in(:,1:ttt);
hours=time_log./3600;
colormap spring

figure(1)
plot(hours,(p_downhole/10^5)','LineWidth',1.5);
ylabel('Downhole Pressure [barg]');
xlabel('Time [Hours] ');
axis([0 5.5 170 250]);
legend('Source 1', 'Source 2', 'Source 3', 'Source 4');
%
figure(2)
plot(hours,w_in','LineWidth',1.5);
ylabel('Inflow from source[kg/s]');
% hold on
% plot(hours,w_in,'r','LineWidth',1.5);
xlabel('Time [Hours]');
axis([0 5.5 2.0 5]);
legend('Source 1', 'Source 2', 'Source 3', 'Source 4');
%
% figure(3)
% plot(GOR','LineWidth',1.5);
% ylabel('Gas oil Ratio [Sm^{3}/Sm^{3}]');
% xlabel('Time [Hours]');
% %axis([3 7 235 265]);
% legend('1', '2', '3', '4');
%
% % reshape P mesh
% Ppp=P(1:6,108000:end);
% Phours=hours(108000:end);
% %
% figure(4)
% mesh(Phours,xl(1:6),Ppp./10^5);
% ylabel('Distance from wellbore, [m]');
% xlabel('Time [Hours]');
