import numpy as np
from matplotlib import pyplot as plt
from labellines import labelLines
plt.rcParams["figure.figsize"] = [7.50,3.50]
plt.rcParams["figure.autolayout"] = True
X = np.linspace(0, 1, 500)
A = [1, 2, 5, 10, 20]
for a in A:
plt.plot(X, np.arctan(a*X), label=str(a))
labelLines(plt.gca().get_lines(), zorder=2.5)
plt.show()