Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
@tacaswell wrote:
Had some thoughts about hardening
BlitManager
a bit more and putting into the library, but was not surewhere to put it and starting in a tutorial seems like a lower-stakes place to start.
ThatBlitManager
class looks pretty useful for 'live' plots that are not timed (e.g. we want to plot at the rate that data becomes available). Maybe the class could be put inmatplotlib.animation
?
Originally posted by@joukewitteveen in#10187 (comment)
BlitManager
is a class that was written for pedagogical and documentation reasons in#10187. When I wrote it I had an idea that it would be generally useful, but was not sure (and did not put in the work to harden / test the code). We now have a user who asking for it so this seems like a good time to re-consider!
The use case that@joukewitteveen has is being on the receive side of a push notification that there is new data, but I think this would make sense anytime that a user wants more control over the timing of the animation (you could also do this with clever use of concurrency + generators but that gets complicated fast).
The work that needs to be done:
- review the API (it should take a figure not a canvas I think)
- add tests
- think through event loop integration (do we want to call
canvas.flush_events
?) - make sure it works on all backends that support blitting (I think the OSX related issues are now fixed, but would be good to check).
- write a tutorial on using it / adapt the existing section to be about it.
We may want to do this in the main repo, but I could also see this fitting in mpl-gui (https://github.com/tacaswell/mpl-gui) at least to start