Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
FIX: allow non bbox_extra_artists calls#12635
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
FIX: allow non bbox_extra_artists calls#12635
Uh oh!
There was an error while loading.Please reload this page.
Conversation
jklymak commentedOct 26, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Note I still need to add a test or two. This shouldn’t have passed CI (EDIT: shuld not have passed CI when the original PR went in)... EDIT: test added! |
985eae1
toed621ad
Compare…635-on-v3.0.xBackport PR#12635 on branch v3.0.x (FIX: allow non bbox_extra_artists calls)
@@ -406,3 +406,18 @@ def test_image_grid(): | |||
for i in range(4): | |||
grid[i].imshow(im) | |||
grid[i].set_title('test {0}{0}'.format(i)) | |||
def test_gettightbbox(): |
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.
Have you looked at the figure produced in this test? Is it working the way it's supposed to? I get oneAxes
with one really bigAxes
overlaid on top of it, but I'm not sure if that's the intended behaviour or not.
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.
Yeah, sorry, its not a very good test. But I'm not sure why axes_grid does that, so that's a different issue. The issue here was that the png being made was not being cropped properly to include the big box whenbbox_inches='tight'
was used.
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Closes#12634
Apparently some axes don't allow accept
bbox_extra_artists
kwarg. I could not track down how to get the parasite axes'get_tightbbox
to accept this kwarg, but this fix seems to work fine.The offending PR was#12363 where I introduced the
bbox_extra_artists
as a kwarg. That was probably a mistake because some axes subclasses out there may not impliment this kwarg.This PR makes that kwarg optional - if
axsubclass.get_tightbbox(renderer, bbox_extra_artists=artists)
gives a TypeError, then we just call it w/o this kwarg.PR Checklist