Skip to content

Add pie artist - #32359

Open
robertoffmoura wants to merge 15 commits into
matplotlib:mainfrom
robertoffmoura:add-pie-artist
Open

robertoffmoura wants to merge 15 commits into
matplotlib:mainfrom
robertoffmoura:add-pie-artist

Conversation

@robertoffmoura

@robertoffmoura robertoffmoura commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

This PR is a follow up to #32320. It adds a Pie artist class and deprecates PieContainer. legend.py checks for a get_legend_handles method, so compound artists can expose their handles.

Previous state:

ax._children = [wedge1, wedge2, wedge3, text1, text2, text3],
ax.patches = [wedge1, wedge2, wedge3]
ax.texts = [text1, text2, text3]
ax.containers = []
pie_container1.wedges = [wedge1, wedge2, wedge3]

State after this PR:

ax._children = [pie1],
ax.patches = []
ax.texts = []
ax.containers = []
pie1.wedges = [wedge1, wedge2, wedge3]
pie1.texts = [text1, text2, text3]

AI Disclosure

AI used to gain understanding of the existing code

  • Use an expressive title, e.g. "Fix title font property precedence"
  • New and changed code is tested
  • N/A Plotting related features are demonstrated in an example
  • New features and API changes have release notes
  • Documentation complies with general and docstring guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant