| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I'm not sure this is the correct fix? The renderer for the subfigure should be the same as the parent's renderer. I think we need to set this up as a property and have the getter go up the tree to the parent? |
Sorry, something went wrong.
No idea. What you says make sense though, so I'll give it a go. |
Sorry, something went wrong.
|
On draw SubFigure redefines the _cachedRenderer. Will there ever be cases where it differs from the parent renderer? |
Sorry, something went wrong.
|
Updated with properties. Not convinced that one need to set the renderer in draw, but guess it shouldn't hurt? |
Sorry, something went wrong.
|
The subfigure really should not have a cached renderer, but subfigures have been abstracted to be like figures so that child artists don't know if they are in a figure or a subfigure. So if an artist does self.figure._cachedRenderer that should always point to the top-most renderer. |
Sorry, something went wrong.
|
I think this is correct. Note that #22745 would have fixed this as well by calling figure._get_renderer(). |
Sorry, something went wrong.
Ahh, OK! Maybe better to try to get that in then? I have not really followed (nor fully understand) that discussion. I guess that the test added here very well can be worthwhile keeping as it seems to exercise the code in a way that once was (currently is) broken. |
Sorry, something went wrong.
|
I think we can have both fixes. #22745 isn't necessarily going to go in ;-) |
Sorry, something went wrong.
|
I suspect this is an argument as to why we actually do need to cache the renderer (and should move it to a central canonical place) and my position that we should not cache it at all is wrong (or at least currently infeasible). |
Sorry, something went wrong.
There was a problem hiding this comment.
Anyone can merge on green.
Sorry, something went wrong.
|
I restarted the failed windows job (it was a blit test in a subprocess I have not seen fail before 🤞🏻 it is transient). |
Sorry, something went wrong.
|
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
git checkout v3.5.x git pull
git cherry-pick -x -m1 af835787ac405d6021d4ed11e57734873c401b9c
git commit -am 'Backport PR #23174: Make sure SubFigure has _cachedRenderer'
git push YOURFORK v3.5.x:auto-backport-of-pr-23174-on-v3.5.x
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the Still Needs Manual Backport label once the PR gets merged. If these instructions are inaccurate, feel free to suggest an improvement. |
Sorry, something went wrong.
Merge pull request matplotlib#23174 from oscargus/clabelsubfigures FIX: Make sure SubFigure has _cachedRenderer (cherry picked from commit af83578)
…-v3.5.x Backport PR #23174: Make sure SubFigure has _cachedRenderer
Merge pull request matplotlib#23174 from oscargus/clabelsubfigures FIX: Make sure SubFigure has _cachedRenderer (cherry picked from commit af83578)
| Back | FazBrowse Home | New Git URL |
PR Summary
Makes sure that _cachedRenderer is added to SubFigure instances by moving it to FigureBase. Closes #23173
Maybe the code in contour should behave differently, but I assume that sooner or later the same problem may happen in other code when applied to a SubFigure and not a Figure.
PR Checklist
Tests and Styling
Documentation