16import matplotlib.pyplot
as plt
18data = np.loadtxt(
'bands4.out', unpack=
True)
21plt.plot(data[0], np.sqrt(np.sum(data[1:3,:]**2, 0)),
'k--', lw=0.7)
24 reference = np.loadtxt(
'bands6.dat', unpack=
True)
28 plt.plot(reference[0], reference[3],
'.', color=
'0.7')
30plt.plot(data[0], data[3],
'.', color=
'maroon', ms=2)
32plt.xticks([0., np.pi, 2*np.pi, np.pi*(2+2**0.5)], [
'$\\Gamma$',
'X',
'M',
'$\\Gamma$'])
33plt.xlim(0., np.pi*(2+2**0.5))
36plt.ylabel(
"$\\omega/c$")
41plt.savefig(
'bands4.png')