Skip to content
Snippets Groups Projects
Commit 81742bd2 authored by Bas Nijholt's avatar Bas Nijholt
Browse files

Use raw strings where needed

parent 73408dde
Branches
No related tags found
1 merge request!1Use raw strings where needed
......@@ -76,7 +76,7 @@ def tight_binding_1d():
k = np.linspace(-pi, pi, 300)
pyplot.plot(k, -np.cos(k))
pyplot.xlabel('$ka$'); pyplot.ylabel('$E$')
pyplot.xticks([-pi, 0, pi], ['$-\pi$', 0, '$\pi$'])
pyplot.xticks([-pi, 0, pi], [r'$-\pi$', 0, r'$\pi$'])
pyplot.yticks([-1, 0, 1], ['$E_0+2t$', '$E_0$', '$E_0-2t$'])
pyplot.savefig('tight_binding_1d.svg')
......@@ -90,7 +90,7 @@ def meff_1d_tb():
pyplot.plot(k[meff < 0], meff[meff < 0], c=color)
pyplot.ylim(-5, 5)
pyplot.xlabel('$ka$'); pyplot.ylabel('$m_{eff}$')
pyplot.xticks([-pi, 0, pi], ['$-\pi$', 0, '$\pi$']);
pyplot.xticks([-pi, 0, pi], [r'$-\pi$', 0, r'$\pi$']);
pyplot.savefig('meff_1d_tb.svg')
......@@ -110,7 +110,7 @@ def phonons_1d_2masses():
ax.plot(k, dispersion_2m(k), label='acoustic')
ax.set_xlabel('$ka$')
ax.set_ylabel(r'$\omega$')
pyplot.xticks([-pi, 0, pi], ['$-\pi$', '$0$', '$\pi$'])
pyplot.xticks([-pi, 0, pi], [r'$-\pi$', '$0$', r'$\pi$'])
pyplot.yticks([], [])
pyplot.vlines([-pi, pi], 0, 2.2, linestyles='dashed')
pyplot.legend()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment