From bef2a84554641fae086fa495c628ce11f53af3e2 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 28 Nov 2022 19:29:47 -0500 Subject: [PATCH] Backport PR #24299: Rework style sheet reference example to cycle props --- examples/style_sheets/style_sheets_reference.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/style_sheets/style_sheets_reference.py b/examples/style_sheets/style_sheets_reference.py index 657c73aadb10..a7be6819aab7 100644 --- a/examples/style_sheets/style_sheets_reference.py +++ b/examples/style_sheets/style_sheets_reference.py @@ -62,7 +62,8 @@ def plot_colored_circles(ax, prng, nb_samples=15): the color cycle, because different styles may have different numbers of colors. """ - for sty_dict, j in zip(plt.rcParams['axes.prop_cycle'], range(nb_samples)): + for sty_dict, j in zip(plt.rcParams['axes.prop_cycle'](), + range(nb_samples)): ax.add_patch(plt.Circle(prng.normal(scale=3, size=2), radius=1.0, color=sty_dict['color'])) # Force the limits to be the same across the styles (because different pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy