Skip to content

Commit

Permalink
Backport PR matplotlib#29120: DOC: Switch nested pie example from cma…
Browse files Browse the repository at this point in the history
…ps to color_sequences
  • Loading branch information
rcomer authored and meeseeksmachine committed Nov 11, 2024
1 parent 3157f23 commit c87f807
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions galleries/examples/pie_and_polar_charts/nested_pie.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
size = 0.3
vals = np.array([[60., 32.], [37., 40.], [29., 10.]])

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

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

0 comments on commit c87f807

Please sign in to comment.