8000 Backport PR #29120: DOC: Switch nested pie example from cmaps to colo… · matplotlib/matplotlib@c87f807 · GitHub
[go: up one dir, main page]

Skip to content

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