FIX: allow non bbox_extra_artists calls#12635
Merged
timhoffm merged 2 commits intomatplotlib:masterfrom Oct 28, 2018
Merged
Conversation
dstansby
approved these changes
Oct 26, 2018
Member
Author
|
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 to
ed621ad
Compare
timhoffm
approved these changes
Oct 28, 2018
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Oct 28, 2018
jklymak
added a commit
that referenced
this pull request
Oct 29, 2018
…635-on-v3.0.x Backport PR #12635 on branch v3.0.x (FIX: allow non bbox_extra_artists calls)
QuLogic
reviewed
Nov 10, 2018
| grid[i].set_title('test {0}{0}'.format(i)) | ||
|
|
||
|
|
||
| def test_gettightbbox(): |
Member
There was a problem hiding this comment.
Have you looked at the figure produced in this test? Is it working the way it's supposed to? I get one Axes with one really big Axes overlaid on top of it, but I'm not sure if that's the intended behaviour or not.
Member
Author
There was a problem hiding this comment.
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 when bbox_inches='tight' was used.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Closes #12634
Apparently some axes don't allow accept
bbox_extra_artistskwarg. I could not track down how to get the parasite axes'get_tightbboxto accept this kwarg, but this fix seems to work fine.The offending PR was #12363 where I introduced the
bbox_extra_artistsas 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