From d805738873ec3979e596ecc46f6da9baafd5adb2 Mon Sep 17 00:00:00 2001 From: Sathish Kumar RK <rksathish09@gmail.com> Date: Tue, 22 Jan 2019 14:54:42 +0000 Subject: [PATCH] added alpha factor and reordered harmonic potential plotting --- src/1_einstein_model.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/1_einstein_model.md b/src/1_einstein_model.md index ae615fb..0e825e6 100644 --- a/src/1_einstein_model.md +++ b/src/1_einstein_model.md @@ -108,8 +108,6 @@ V = 0.5*(omega**2)*(x**2) fig, ax = pyplot.subplots(figsize=(10, 7)) -ax.plot(x, V) #plot harmonic potential - for i in range(no_states): 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): xytext=(x[0]+1/2, h0_ener(i-1)), 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) ax.spines['left'].set_position('center') ax.spines['bottom'].set_position(('data', 0.0)) -- GitLab