You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: subfigure artists not drawn interactively #28384
@tacaswell does it matter that that callback will currently only set the root figure to stale and not any intermediate subfigures when they are nested?
If it does matter, we can just wait for #28177 and then update the callback to work on self.get_figure(root=False).
Ah, no worries. I was feeling guilty that my initial comment had too little detail and I was wasting your time digging!
I think waiting for #28177 to land might make sense, but it is not critical as either way, the thing that triggers the automatic re-rendering is the stale state of the top-level figure (via
Activity
tacaswell commentedon Jun 12, 2024
Very likely the issue is that
obj.staleis not propogating up from the sub-figure to the parent.jklymak commentedon Jun 12, 2024
Huh. I never use interactive mode so didn't test that! Seems a pretty big oversight. Thanks for finding.
tacaswell commentedon Jun 13, 2024
is the fix. I don't have time right now to add a test etc. I'll try to get to it later today but will not be at all angry if someone takes over.
rcomer commentedon Jun 14, 2024
@tacaswell does it matter that that callback will currently only set the root figure to stale and not any intermediate subfigures when they are nested?
If it does matter, we can just wait for #28177 and then update the callback to work on
self.get_figure(root=False).rcomer commentedon Jun 14, 2024
Full disclosure: this is how far I got
main...rcomer:matplotlib:subfigure-stale
Currently the last line of the test fails. I tried and failed to create an example to show that this matters.
Sorry, I probably should have commented right after I did this to avoid duplicating effort.
tacaswell commentedon Jun 14, 2024
Ah, no worries. I was feeling guilty that my initial comment had too little detail and I was wasting your time digging!
I think waiting for #28177 to land might make sense, but it is not critical as either way, the thing that triggers the automatic re-rendering is the stale state of the top-level figure (via
matplotlib/lib/matplotlib/_pylab_helpers.py
Lines 124 to 131 in b19794e
matplotlib/lib/matplotlib/pyplot.py
Line 298 in b19794e
matplotlib/lib/matplotlib/pyplot.py
Lines 1062 to 1063 in b19794e
rcomer commentedon Jun 14, 2024
Thanks @tacaswell! So, when the top
Figureis re-drawn, does it re-draw all the artists on it, or just those ones that are currently marked "stale"?