Skip to content

Commit c87f807

Browse files
rcomermeeseeksmachine
authored andcommitted
Backport PR #29120: DOC: Switch nested pie example from cmaps to color_sequences
1 parent 3157f23 commit c87f807

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

galleries/examples/pie_and_polar_charts/nested_pie.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
size = 0.3
3232
vals = np.array([[60., 32.], [37., 40.], [29., 10.]])
3333

34-
cmap = plt.colormaps["tab20c"]
35-
outer_colors = cmap(np.arange(3)*4)
36-
inner_colors = cmap([1, 2, 5, 6, 9, 10])
34+
tab20c = plt.color_sequences["tab20c"]
35+
outer_colors = [tab20c[i] for i in [0, 4, 8]]
36+
inner_colors = [tab20c[i] for i in [1, 2, 5, 6, 9, 10]]
3737

3838
ax.pie(vals.sum(axis=1), radius=1, colors=outer_colors,
3939
wedgeprops=dict(width=size, edgecolor='w'))

0 commit comments

Comments
 (0)
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