from matplotlib import pylab as pl import numpy as np t, ezp, ehm, lp = np.loadtxt('thermal-expansion-data.txt',unpack=True) fig = pl.figure() enerax = fig.add_subplot(2,1,1) enerax.set_ylabel("Helmholtz Free Energy/ eV") enerax.set_xlabel("Temperature/ K") lattax = fig.add_subplot(2,1,2) lattax.set_ylabel("Lattice Parameter/ Angstroms") lattax.set_xlabel("Temperature/ K") pl.subplots_adjust(hspace = 0.5) enerax.plot(t, ehm,color='red') lattax.plot(t, lp,color='green') pl.show()