-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Why is _gci a private method? #4517
Comments
This is probably better suited for the matplotlib-dev mailing list as this isn't a bug. That said, while I was not involved with the design of this stuff, the only reason why we have gcf/gca and friends is because that's what Matlab has. Last I checked, gci is not a Matlab function, and such magical things really should be discouraged from common use, especially when its behavior can be difficult to test. |
|
and you can pass an |
I'm sorry I didn't realize the matplotlib issues tracker is explicitly limited to bugs.
Maybe don't close the issue then if you don't have a good answer? |
Right, but the point is that seaborn is not always going to be able to predict what kind of artist is going to be useful for the colorbar. Given that matplotlib has the machinery to work that out by inspecting the object, I was wondering why that machinery is marked as private. It's very useful! |
I closed the issue because it isn't a bug. And I am sorry you think my On Fri, Jun 12, 2015 at 11:51 AM, Michael Waskom notifications@github.com
|
No thanks; I'm pretty sure you'd just respond to my email with "this isn't a question about matplotlib development". |
??? I am sorry, did I miss something somewhere? This is completely a question On Fri, Jun 12, 2015 at 11:57 AM, Michael Waskom notifications@github.com
|
I don't understand why seaborn can't predict this but mpl can. You can capture the artists created in your plotting functions and you either know ahead of time if you are going to expect color mapped artists back or you can introspect them and see what sub-classes |
I was trying to figure out how the
plt.colorbar
magic works to try and extend better support for colorbars in multi-panel seaborn figure objects. I figured out it all runs though the_gci
methods on the figure and axes objects, which are very helpful. But why are they protected with a leading underscore? Is there a better way to generically apply a colorbar in an object-oriented context?The text was updated successfully, but these errors were encountered: