-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ENH : Nbagg blit #4290
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
ENH : Nbagg blit #4290
Conversation
attn @pelson |
Also closes #4287 |
attn @blink1073 This might be relevant for scikit-image's stuff. |
Ooh, shiny! I'll check it out tonight. |
This appears to have broken UAT 13 - Animation. If I run the all of the cells, it yields an empty figure. If I try and run it again, I get a static line with an animated line running through it, and this error: ERROR:tornado.application:Exception in callback <bound method TimerTornado._on_timer of <matplotlib.backends.backend_nbagg.TimerTornado object at 0x109d78450>>
Traceback (most recent call last):
File "/Users/stevensilvester/Library/Python/2.7/lib/python/site-packages/tornado/ioloop.py", line 989, in _run
return self.callback()
File "/Users/stevensilvester/workspace/matplotlib/lib/matplotlib/backend_bases.py", line 1290, in _on_timer
ret = func(*args, **kwargs)
File "/Users/stevensilvester/workspace/matplotlib/lib/matplotlib/animation.py", line 925, in _step
still_going = Animation._step(self, *args)
File "/Users/stevensilvester/workspace/matplotlib/lib/matplotlib/animation.py", line 784, in _step
self._draw_next_frame(framedata, self._blit)
File "/Users/stevensilvester/workspace/matplotlib/lib/matplotlib/animation.py", line 804, in _draw_next_frame
self._post_draw(framedata, blit)
File "/Users/stevensilvester/workspace/matplotlib/lib/matplotlib/animation.py", line 827, in _post_draw
self._blit_draw(self._drawn_artists, self._blit_cache)
File "/Users/stevensilvester/workspace/matplotlib/lib/matplotlib/animation.py", line 841, in _blit_draw
bg_cache[a.axes] = a.figure.canvas.copy_from_bbox(a.axes.bbox)
File "/Users/stevensilvester/workspace/matplotlib/lib/matplotlib/backends/backend_webagg_core.py", line 196, in copy_from_bbox
renderer = self._last_renderer
AttributeError: 'FigureCanvasNbAgg' object has no attribute '_last_renderer' |
If I run UAT 1 and then skip down to UAT 13, it runs but the spines and tick labels are flickering. |
If you resize it a couple times it eventually sorts it's self out. I think the underlying issue is related to it actually having two renderers so half the time it ends up drawing the line on to a renderer that never had the rest of the artists drawn. The re-sizing causes enough thrashing that eventually things work out. Looking into this now. |
There are other problems such as the animation object not stopping after the figure is closed which pins a CPU.... |
I would bet that that problem is the same as the one recently reported for
|
fixes some issues (makes sure we always have a renderer), but something much worse is wrong underneath (the animation objects goes crazy and eats all of the CPU).
Apologies that this has become a bit stale. Rebasing this on top of master, I get:
It would be nice to see this revived... |
…plotlib#4290. Everything seems to work ok except UAT4 doesn't close the old figure (just gets rid of the interactive widgets around it), and UAT13 has flickering at the edges of the axis (y ticks).
… compatibility with latest jupyter notebook).
Closing in lieu of #9240 |
Closes #4288