diff --git a/src/1_einstein_model.md b/src/1_einstein_model.md index 151c17710fd8c65329a147fa469cb7ef0c4e84cc..ae615fb5d2fe65acfa8fb9e01e372011246e8434 100644 --- a/src/1_einstein_model.md +++ b/src/1_einstein_model.md @@ -63,8 +63,6 @@ So there is: This can be explained by considering a _quantum_ harmonic oscillator: - - ```python import math from numpy.polynomial.hermite import Hermite @@ -120,7 +118,7 @@ for i in range(no_states): # annotate plot - ax.text(x[len(x)-1], h0_ener(i)+1/4, '$\Psi_%2i (x)$' %(i), + ax.text(x[len(x)-1], h0_ener(i)+1/4, r'$\Psi_%2i (x)$' %(i), horizontalalignment='center', fontsize=14) ax.text(1/4, h0_ener(i)+1/4, '$E_%2i$' %(i), @@ -134,7 +132,7 @@ for i in range(no_states): xytext=(x[0]+1/2, h0_ener(i)), arrowprops=dict(arrowstyle="<->")) elif i==1: - ax.text(x[0]+1/4, h0_ener(i-1)+1/3, '$\hbar\omega$', + ax.text(x[0]+1/4, h0_ener(i-1)+1/3, r'$\hbar\omega$', horizontalalignment='center', fontsize=14) ax.annotate("", xy=(x[0]+1/2, h0_ener(i)), @@ -156,8 +154,8 @@ ax.set_yticklabels([]) ax.set_xticklabels([]) # Set x and y labels -ax.set_xlabel('X '+'($\sqrt{\hbar/m\omega}$)', fontsize=12) -ax.set_ylabel('E '+'($\hbar\omega$)', fontsize=12) +ax.set_xlabel('X '+ r'($\sqrt{\hbar/m\omega}$)', fontsize=12) +ax.set_ylabel('E '+ r'($\hbar\omega$)', fontsize=12) ax.yaxis.set_label_coords(0.5,1) ```