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