Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[ENH] hatch keyword for pie + some pie documentation#24470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jklymak merged 1 commit intomatplotlib:mainfromstory645:pie
Jan 11, 2023

Conversation

story645
Copy link
Member

@story645story645 commentedNov 15, 2022
edited
Loading

PR Summary

Added the ability to pass in a list of wedgeproperty dicts, one for each wedge of the pie. Follow on to#2923, would probably address#3134 , inspired bytwitter convo

Yes, I know it can be achieved via loop - see the fig comparison test in this PR - but we were already looping over the wedges inside the function to set all the other properties so the major addition is testing if the input is a dict or list of dicts. <- this could possibly be factored into a cbook function, my guess being 'if thing not list wrap in repeat' is not uncommon in the codebase.

Current Iteration

  1. Changed this to a hatchkwarg based on the call, added tests + whats new example.
  2. cleaned up pct/label loc docs from[ENH]: Ability to Swap autopct and label positions #24789, reordered docs to mostly match signature, and added sentence that wedgeprop takes precedence over other parameter setting (in current implementation, seemed sorting this out was out of scope for this PR)
x= [0.3,0.3,0.1]fig,ax=plt.subplots()ax.pie(x,hatch=['/','+','.'])

which would produce roughly

pie

I'll put in a what's new and example if there's consensus on this going in.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).

Documentation

  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a.. versionadded:: directive in the docstring and documented indoc/users/next_whats_new/
  • API changes are marked with a.. versionchanged:: directive in the docstring and documented indoc/api/next_api_changes/
  • Release notes conform with instructions innext_whats_new/README.rst ornext_api_changes/README.rst

@oscargus
Copy link
Member

I think this makes sense!

story645 reacted with laugh emoji

@oscargusoscargus added this to thev3.7.0 milestoneDec 8, 2022
@story645story645 changed the title[ENH] Vectorized Wedgeprops argument to pie[ENH] hatch keyword for pie + scatter pie documentationDec 21, 2022
@story645story645 changed the title[ENH] hatch keyword for pie + scatter pie documentation[ENH] hatch keyword for pie + some pie documentationDec 21, 2022
@story645story645force-pushed thepie branch 4 times, most recently from6c6218e to60f9af8CompareDecember 22, 2022 06:30
@story645story645force-pushed thepie branch 3 times, most recently froma74fa53 to7b7c8faCompareDecember 22, 2022 21:07
@story645story645force-pushed thepie branch 2 times, most recently from625d2e6 to520480bCompareJanuary 8, 2023 02:21
@story645
Copy link
MemberAuthor

I don't think the failing tests are connected to this PR 😟

@QuLogic
Copy link
Member

Test failures are unrelated.

@story645
Copy link
MemberAuthor

I wrote alt text for the what's new entry here but should I just put that as a follow up so this doesn't go through another round of reviews?

@QuLogic
Copy link
Member

You can add it here if you want to update and get#24921 in to fix CI.

Copy link
Member

@dstansbydstansby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good - just one question, which is either a quick fix or I'm missing something. Either way happy for this to be merged once it's been considered!

reworded pctdistance and labeldistance b/c ofmatplotlib#24789Co-authored-by: Oscar Gustafsson <oscar.gustafsson@gmail.com>Co-authored-by: sledziu32 <sledziu32@gmail.com>Co-authored-by: Jody Klymak <jklymak@gmail.com>
@jklymakjklymak merged commita483e85 intomatplotlib:mainJan 11, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestJan 11, 2023
@story645story645 deleted the pie branchJanuary 11, 2023 01:04
QuLogic added a commit that referenced this pull requestJan 11, 2023
…470-on-v3.7.xBackport PR#24470 on branch v3.7.x ([ENH] hatch keyword for pie + some pie documentation)
@ksundenksunden mentioned this pull requestFeb 20, 2023
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm left review comments

@dstansbydstansbydstansby approved these changes

@oscargusoscargusoscargus left review comments

@QuLogicQuLogicQuLogic approved these changes

@jklymakjklymakjklymak approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.7.0
Development

Successfully merging this pull request may close these issues.

6 participants
@story645@oscargus@QuLogic@jklymak@timhoffm@dstansby

[8]ページ先頭

©2009-2025 Movatter.jp