<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">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")
# &lt;matplotlib.legend.Legend object at 0x3b3ee10&gt;
plt.show()
</pre></body></html>