When I plot horizontal lines using axhline, there resulting lines are all the same color. It doesn’t cycle automatically. Is this behavior expected? Do I need to manually setup the color cycling? If so how can I do this easily? Why does matplotlib not automatically cycle through the colors for axhline?
%matplotlib widget import matplotlib.pyplot as plt fig, ax = plt.subplots() count = 5 for n in range(count): ax.axhline(y=n**2, label=n) ax.legend() plt.show()