Thermodynamic origin and graphical methods of phase theory