hello
maybe this ?
NB : I used large steps for pressure and temperature to avoid creating very large arrays - adapt to your needs
clearvars
P=200:1000:10000;%the pressure range (NB : pressure steps = 1000)
T=100:100:600; % temperature range (NB : temperature steps = 100)
figure(1)
hold on
for ci = 1:numel(T)
d = (0.3*P+T(ci)); % density equation it is not real one it is example
str_leg{ci} = ['Temp. = ' num2str(T(ci)) , ' deg C'];
plot(P,d);
end
legend(str_leg);