Skip to content
Snippets Groups Projects
Commit d8057388 authored by Sathish Kumar RK's avatar Sathish Kumar RK
Browse files

added alpha factor and reordered harmonic potential plotting

parent 902c9ab4
No related branches found
No related tags found
No related merge requests found
...@@ -108,8 +108,6 @@ V = 0.5*(omega**2)*(x**2) ...@@ -108,8 +108,6 @@ V = 0.5*(omega**2)*(x**2)
fig, ax = pyplot.subplots(figsize=(10, 7)) fig, ax = pyplot.subplots(figsize=(10, 7))
ax.plot(x, V) #plot harmonic potential
for i in range(no_states): for i in range(no_states):
ax.hlines(h0_ener(i), x[0], x[len(x)-1], linestyles='dotted', colors='k') ax.hlines(h0_ener(i), x[0], x[len(x)-1], linestyles='dotted', colors='k')
...@@ -139,8 +137,10 @@ for i in range(no_states): ...@@ -139,8 +137,10 @@ for i in range(no_states):
xytext=(x[0]+1/2, h0_ener(i-1)), xytext=(x[0]+1/2, h0_ener(i-1)),
arrowprops=dict(arrowstyle="<->")) arrowprops=dict(arrowstyle="<->"))
ax.fill_between(x, h0_ener(i), ho_evec(x, i, no_states) + h0_ener(i)) ax.fill_between(x, h0_ener(i), ho_evec(x, i, no_states) + h0_ener(i), alpha=0.5)
ax.plot(x, V, 'k', linewidth=1) #plot harmonic potential
# Move left y-axis and bottim x-axis to centre, passing through (0,0) # Move left y-axis and bottim x-axis to centre, passing through (0,0)
ax.spines['left'].set_position('center') ax.spines['left'].set_position('center')
ax.spines['bottom'].set_position(('data', 0.0)) ax.spines['bottom'].set_position(('data', 0.0))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment