%plotPT

load p_salinity_Kehua_Liu_NaCl.mat
T_salinity=(0:0.1:40);
salinity=(0:0.5:40)/100;
T=(0:0.1:40);
N=length(T);

for i=1:N
   P1(i)=interpolation_pressure(p_salinity,T_salinity,salinity,0.037,T(i));
end

for i=1:N
   P2(i)=interpolation_pressure(p_salinity,T_salinity,salinity,0.035,T(i));
end

for i=1:N
   P3(i)=interpolation_pressure(p_salinity,T_salinity,salinity,0.033,T(i));
end

for i=1:N
   P4(i)=interpolation_pressure(p_salinity,T_salinity,salinity,0.0,T(i));
end

% for x=1:N
%    PV(i)=interpolation_pressure(p_salinity,T_salinity,salinity,0.094,T(i));
% end



figure(1)
plot(T,P1,'r-',T,P2,'g-',T,P3,'k-',T,P4,'b-')
ylabel('Pressure (MPa)','FontSize',15)
xlabel('Temperature (\circC)','FontSize',15)
ylim([0 6])
xlim([0 10])
set(gca,'XTick',(0:1:40),'YTick',(0:2:40))

% figure(2)
% plot(T,P12,'b-',T,P7,'r-',T,P6,'g-',T,P0,'k-')
% ylabel('Pressure (MPa)','FontSize',15)
% xlabel('Temperature (\circC)','FontSize',15)
% ylim([0 20])
% xlim([0 20])
% set(gca,'XTick',(0:2:20),'YTick',(0:2:20))