Code
plt.figure(figsize=(24,7))
plt.subplot(1,3,1)
plt.loglog(H,err_ep, 'r-o',label=f'AB-1 = EE {np.polyfit(np.log(H),np.log(err_ep), 1)[0]:1.2f}')
plt.loglog(H,err_AB2, 'g-+',label=f'AB2 {np.polyfit(np.log(H),np.log(err_AB2), 1)[0]:1.2f}')
plt.loglog(H,err_AB3, 'c-D',label=f'AB3 {np.polyfit(np.log(H),np.log(err_AB3), 1)[0]:1.2f}')
plt.loglog(H,err_AB4, 'y-*',label=f'AB4 {np.polyfit(np.log(H),np.log(err_AB4), 1)[0]:1.2f}')
plt.loglog(H,err_AB5, 'r-.',label=f'AB5 {np.polyfit(np.log(H),np.log(err_AB5), 1)[0]:1.2f}')
plt.loglog(H,err_N2, 'y-*',label=f'N2 {np.polyfit(np.log(H),np.log(err_N2), 1)[0]:1.2f}')
plt.loglog(H,err_N3, 'r-<',label=f'N3 {np.polyfit(np.log(H),np.log(err_N3), 1)[0]:1.2f}')
plt.loglog(H,err_N4, 'b-+',label=f'N4 {np.polyfit(np.log(H),np.log(err_N4), 1)[0]:1.2f}')
plt.loglog(H,err_em, 'c-o',label=f'EM {np.polyfit(np.log(H),np.log(err_em), 1)[0]:1.2f}')
plt.loglog(H,err_RK4, 'g-o',label=f'RK4_1 {np.polyfit(np.log(H),np.log(err_RK4), 1)[0]:1.2f}')
plt.loglog(H,err_RK6_5, 'b-*',label=f'RK6_5 {np.polyfit(np.log(H),np.log(err_RK6_5), 1)[0]:1.2f}')
plt.loglog(H,err_RK7_6, 'r-D',label=f'RK7_6 {np.polyfit(np.log(H),np.log(err_RK7_6), 1)[0]:1.2f}')
plt.xlabel('$h$')
plt.ylabel('$e$')
plt.title("Schemas explicites")
plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.05), fancybox=True, shadow=True, ncol=1)
plt.grid(True)
plt.subplot(1,3,2)
plt.loglog(H,err_er, 'r-o',label=f'AM-0 = EI {np.polyfit(np.log(H),np.log(err_er), 1)[0]:1.2f}')
plt.loglog(H,err_CN, 'g-v',label=f'AM-1 = CN {np.polyfit(np.log(H),np.log(err_CN), 1)[0]:1.2f}')
plt.loglog(H,err_AM2, 'b->',label=f'AM2 {np.polyfit(np.log(H),np.log(err_AM2), 1)[0]:1.2f}')
plt.loglog(H,err_AM3, 'c-D',label=f'AM3 {np.polyfit(np.log(H),np.log(err_AM3), 1)[0]:1.2f}')
plt.loglog(H,err_AM4, 'y-+',label=f'AM4 {np.polyfit(np.log(H),np.log(err_AM4), 1)[0]:1.2f}')
plt.loglog(H,err_AM5, 'm-<',label=f'AM5 {np.polyfit(np.log(H),np.log(err_AM5), 1)[0]:1.2f}')
plt.loglog(H,err_BDF2,'r-*',label=f'BDF2 {np.polyfit(np.log(H),np.log(err_BDF2), 1)[0]:1.2f}')
plt.loglog(H,err_BDF3,'g-^',label=f'BDF3 {np.polyfit(np.log(H),np.log(err_BDF3), 1)[0]:1.2f}')
plt.loglog(H,err_MS2, 'b-d',label=f'MS2 {np.polyfit(np.log(H),np.log(err_MS2), 1)[0]:1.2f}')
plt.loglog(H,err_RK1_M, 'c-o',label=f'RK1_M {np.polyfit(np.log(H),np.log(err_RK1_M), 1)[0]:1.2f}')
plt.loglog(H,err_Randau_IIa_2, 'y-D',label=f'Randau_IIa_2 {np.polyfit(np.log(H),np.log(err_Randau_IIa_2), 1)[0]:1.2f}')
plt.xlabel('$h$')
plt.ylabel('$e$')
plt.title("Schemas implicites")
plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.05), fancybox=True, shadow=True, ncol=1)
plt.grid(True)
plt.subplot(1,3,3)
plt.loglog(H,err_heun, 'y->',label=f'Heun {np.polyfit(np.log(H),np.log(err_heun), 1)[0]:1.2f}')
plt.loglog(H,err_AM4AB2, 'r-<',label=f'AM4_AB2 {np.polyfit(np.log(H),np.log(err_AM4AB2), 1)[0]:1.2f}')
plt.loglog(H,err_AM4AB3, 'b-v',label=f'AM4_AB3 {np.polyfit(np.log(H),np.log(err_AM4AB3), 1)[0]:1.2f}' )
plt.loglog(H,err_AM4AB4, 'm-*',label=f'AM4_AB4 {np.polyfit(np.log(H),np.log(err_AM4AB4), 1)[0]:1.2f}')
plt.loglog(H,err_AM4AB5, 'g-+',label=f'AM4_AB5 {np.polyfit(np.log(H),np.log(err_AM4AB5), 1)[0]:1.2f}' )
plt.xlabel('$h$')
plt.ylabel('$e$')
plt.title("Schemas predicteur-correcteur")
plt.legend(loc='upper center', bbox_to_anchor=(0.5, -0.05), fancybox=True, shadow=True, ncol=1)
plt.grid(True)