You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow a single property cycler to be reused across multiple axes, with
plots on any axes advancing the same joint iterator.
e.g.
```python
from matplotlib import pyplot as plt
from matplotlib.axes._base import to_shareable_cycler
shared = to_shareable_cycler(plt.rcParams["axes.prop_cycle"])
fig, axs = plt.subplots(2, sharex=True)
axs[0].set_prop_cycle(shared)
axs[1].set_prop_cycle(shared)
axs[0].plot([0, 1])
axs[1].plot([0, 1])
# Check that fill uses a separate iterator.
axs[1].fill([2, 3, 4], [0, 1, 0])
axs[0].fill([2, 3, 4], [0, 1, 0])
# Check that the second axes goes back to the first color, even though it
# didn't use it on the first cycle.
for i in range(10):
axs[1].plot([5+i, 5+i], [0, 1])
plt.show()
```
0 commit comments