Phase diagrams show how altering the pressure or the temperature changes the relative free energies of the states of matter. At higher pressure, for example, changes which cause the system to expand, such as transition from a liquid to a gas, require more thermodynamic work, so more heat would have to flow in to the system from the surroundings to make this happen, so expansion become less favored at high pressures. At high temperature, however, the likelihood of heat flow from the surroundings to the system increases, and the gaseous phase becomes more likely.