-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
axes.pie should support patch kwargs #3134
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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? |
Please see the version of pie on the master branch. I think this is already addressed. |
See issue #2923 . |
I further consideration, I think have a pie class is a good idea, but for the purpose of artist wrangling after it is drawn. |
In that case, I suppose to make it most compatible with existing function, the |
Yes, that is what I had in mind. The mep would be for codifying how to do this in general and |
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. |
no, MEPS are on the wiki: https://github.com/matplotlib/matplotlib/wiki#matplotlib-enhancement-proposals-meps |
HAving a go at starting a MEP for this: |
My thought was that this would be a specific case of what MEP25 is working on. |
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! |
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! |
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..
The text was updated successfully, but these errors were encountered: