Skip to content

Commit 0273ddc

Browse files
authored
Merge pull request matplotlib#29121 from meeseeksmachine/auto-backport-of-pr-29120-on-v3.9.x
Backport PR matplotlib#29120 on branch v3.9.x (DOC: Switch nested pie example from cmaps to color_sequences)
2 parents 3157f23 + c87f807 commit 0273ddc

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

+3-3
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)