FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

axes.pie should support patch kwargs · Issue #3134 · matplotlib/matplotlib · GitHub

Repository navigation

axes.pie should support patch kwargs #3134

Open

Description

axes.pie() creates a number of patches and text instances, but allows a limited subset of arguments in it's call signature.

It would be far more useful if it supported a kwargs argument, where the keyword arguments would be passed on to patch calls.

This would allow a gid to be set, encompassing each patch in the piechart (makes it much easier to then retrieve the handle to all elements of the pie chart for example, or include the pie chart)
Pickers could be set, edgecolor could be easily customised etc..

Activity

  1. JamesRamm commented on Jun 11, 2014

    Author

    Best solution might be a new pie class, where texts and patches are implemented as seperate functions, to support kwargs for both:

    class Pie()
    
    def __init__(self, x, explode = None,
                        labels = None, colors = None, 
                        autopct = None, pctdistance = 0.6,
                        shadow = False, labeldistance = 1.1, 
                        startangle = None, radius = None)
    
        # assignment & validation here
        raise NotImplementedError
    
    def create_wedges(self, **kwargs):
          # Create patch wedges & shadow
          raise NotImplementedError
    
    def create_texts(self, **kwargs):
        # Create labels & 'autotexts'..
        raise NotImplementedError
    
    def remove(self):
         raise NotImplementedError    

    Could this fit with the existing API?

  2. tacaswell commented on Jun 11, 2014

    Member

    Please see the version of pie on the master branch. I think this is already addressed.

  3. tacaswell commented on Jun 11, 2014

    Member

    See issue #2923 .

  4. tacaswell commented on Jun 11, 2014

    Member

    I further consideration, I think have a pie class is a good idea, but for the purpose of artist wrangling after it is drawn.

  5. JamesRamm commented on Jun 12, 2014

    Author

    In that case, I suppose to make it most compatible with existing function, the pie.__init__ method would handle plotting (so that the call signature is unaffected) and update() methods would be provided, which accept patch/text kwargs to apply changes?

  6. tacaswell commented on Jun 12, 2014

    Member

    Yes, that is what I had in mind. The mep would be for codifying how to do this in general and
    related to the talk of moving towards a dom model for keeping track of artists.

  7. JamesRamm commented on Jun 13, 2014

    Author

    This is daft, but I'm was trying to find out about MEP's - where they are/how they get written and I can't find anything.
    Are MEP's and github issues one and the same?

  8. tacaswell commented on Jun 25, 2014

    Member
  9. tacaswell commented on Jul 12, 2014

    Member
  10. JamesRamm commented on Jul 12, 2014

    Author

    HAving a go at starting a MEP for this:
    https://github.com/matplotlib/matplotlib/wiki/MEP-26

  11. tacaswell commented on Jul 12, 2014

    Member

    My thought was that this would be a specific case of what MEP25 is working on.

  12. petehuang commented on Dec 29, 2016

    Contributor

    Hi,

    This issue has been inactive for a while. What's the latest discussion on this? MEP25 was last updated in 2014, along with this issue. Thanks!

  13. modified the milestones: , on Oct 3, 2017
  14. github-actions commented on Mar 5, 2023

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  15. added
    keepItems to be ignored by the “Stale” Github Action
    and removed
    status: inactiveMarked by the “Stale” Github Action
    on Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL