Temperature has an effect on density .
In general , density can be changed by changing either the pressure or the temperature .