Skip to content

Commit d0820c4

Browse files
authored
Merge pull request #29120 from timhoffm/doc-nested-pie
DOC: Switch nested pie example from cmaps to color_sequences
2 parents 38a8e15 + d732d1f commit d0820c4

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