Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b6e220

Browse files
authored
Merge pull request #24560 from meeseeksmachine/auto-backport-of-pr-24299-on-v3.6.2-doc
Backport PR #24299 on branch v3.6.2-doc (Rework style sheet reference example to cycle props)
2 parents f341034 + bef2a84 commit 3b6e220

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/style_sheets/style_sheets_reference.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def plot_colored_circles(ax, prng, nb_samples=15):
6262
the color cycle, because different styles may have different numbers
6363
of colors.
6464
"""
65-
for sty_dict, j in zip(plt.rcParams['axes.prop_cycle'], range(nb_samples)):
65+
for sty_dict, j in zip(plt.rcParams['axes.prop_cycle'](),
66+
range(nb_samples)):
6667
ax.add_patch(plt.Circle(prng.normal(scale=3, size=2),
6768
radius=1.0, color=sty_dict['color']))
6869
# Force the limits to be the same across the styles (because different

0 commit comments

Comments
 (0)