Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b1debc4

Browse filesBrowse files
authored
Merge pull request #29122 from meeseeksmachine/auto-backport-of-pr-29120-on-v3.10.x
Backport PR #29120 on branch v3.10.x (DOC: Switch nested pie example from cmaps to color_sequences)
2 parents e0aba39 + 1481dca commit b1debc4
Copy full SHA for b1debc4

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎galleries/examples/pie_and_polar_charts/nested_pie.py

Copy file name to clipboardExpand all lines: galleries/examples/pie_and_polar_charts/nested_pie.py
+3-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.