-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Adding Grid.tick_params() method. #2944
Conversation
I wasn't sure if you wanted to put this in the 0.12.0 release or the 0.13.0 release, so I held off on adding to the What's New for now. I also didn't add to the examples in case you wanted to either leave it out or had a specific change in mind. Let me know what you're thinking. |
Codecov Report
@@ Coverage Diff @@
## master #2944 +/- ##
=======================================
Coverage 98.30% 98.31%
=======================================
Files 69 69
Lines 22985 23030 +45
=======================================
+ Hits 22596 22641 +45
Misses 389 389
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @stefmolin, looks great, just a couple tiny comments.
This can go into 0.12 as I haven't cut a release candidate yet, so please update the release notes. |
Comments addressed and release notes updated. I also updated the usage of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant, thanks @stefmolin! Last bit, and sorry for missing this in my first review, but we should avoid accessing private matplotlib attributes as a general rule. I think the suggested change will work, and then this is 🟢🟢🟢
Odd, I wonder why that didn't work. Since matplotlib seems to be doing something weird here, probably best to use a different property. ax = plt.gca()
ax.tick_params(pad=4.7)
yt, *_ = ax.yaxis.get_major_ticks()
print(yt.get_pad()) 4.7 Feel free to change locally and force push over my attempt at a fix. |
09cd646
to
e4bd180
Compare
Switched to |
Wonderful! |
Closes #2491
FacetGrid
andPairGrid
now have atick_params()
method, which will iterate over eachAxes
in the grid and call itstick_params()
method. Some examples: