Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Description
As requested by@story645, I am posting a possible bug I reported in the forumhttps://discourse.matplotlib.org/t/axhline-doesnt-cycle-through-colors/20938
When I plot horizontal lines usingaxhline
, 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 foraxhline
?
matplotlib v3.2.0
%matplotlib widgetimport matplotlib.pyplot as pltfig, ax = plt.subplots()count = 5for n in range(count): ax.axhline(y=n**2, label=n) ax.legend()plt.show()