import matplotlib.pyplot as plt from numpy.polynomial import Chebyshev as T x = np.linspace(-2, 2, 100) for i in range(6): ax = plt.plot(x, T.basis(i)(x), lw=2, label="$T_%d$"%i) # ... plt.legend(loc="lower right") # plt.show()