fig_1 = plt.figure(figsize=(12,4), num='Energy diagrams')
gamma = 1.
ang_mom = 2.
p1 = Potential(ang_mom, gamma=gamma, mu=1)
E1 = 3.
ax_1 = fig_1.add_subplot(1,3,1)
r_pts = np.linspace(0.001, 3., 200)
U_pts = p1.U(r_pts)
Ucf_pts = p1.Ucf(r_pts)
Ueff_pts = p1.Ueff(r_pts)
ax_1.plot(r_pts, U_pts, linestyle='dashed', color='blue', label='U(r)')
ax_1.plot(r_pts, Ucf_pts, linestyle='dotted', color='green', label='U_cf(r)')
ax_1.plot(r_pts, Ueff_pts, linestyle='solid', color='red', label='U_eff(r)')
ax_1.set_xlim(0., 3.)
ax_1.set_ylim(-10., 10.)
ax_1.set_xlabel('r')
ax_1.set_ylabel('U(r)')
ax_1.set_title(f'$\gamma = {gamma},\ \ l = {ang_mom}$')
ax_1.legend(loc='upper center')
ax_1.axhline(0.0, color='black', alpha=0.3)
ax_1.axhline(E1, color='red', alpha=0.5)
ax_1.annotate(r'$E_1$', (2.5,3.5), color='red', alpha=0.7)
gamma = 3.
ang_mom = 1.
p2 = Potential(ang_mom, gamma=gamma, mu=1)
E2 = -2.
ax_2 = fig_1.add_subplot(1,3,2)
r_pts = np.linspace(0.001, 3., 200)
U_pts = p2.U(r_pts)
Ucf_pts = p2.Ucf(r_pts)
Ueff_pts = p2.Ueff(r_pts)
ax_2.plot(r_pts, U_pts, linestyle='dashed', color='blue', label='U(r)')
ax_2.plot(r_pts, Ucf_pts, linestyle='dotted',
color='green', label='U_cf(r)')
ax_2.plot(r_pts, Ueff_pts, linestyle='solid', color='red', label='U_eff(r)')
ax_2.set_xlim(0., 3.)
ax_2.set_ylim(-10., 10.)
ax_2.set_xlabel('r')
ax_2.set_ylabel('U(r)')
ax_2.set_title(f'$\gamma = {gamma},\ \ l = {ang_mom}$')
ax_2.legend(loc='upper center')
ax_2.axhline(0.0, color='black', alpha=0.3)
ax_2.axhline(E1, color='red', alpha=0.5)
ax_2.axhline(E2, color='red', alpha=0.5)
ax_2.annotate(r'$E_1$', (2.5,3.5), color='red', alpha=0.7)
ax_2.annotate(r'$E_2$', (2.5,-3.2), color='red', alpha=0.7)
fig_1.tight_layout()