I've expanded a bit on my previous solution for pre/post draw method
callbacks to add a registry which can be used to connect up arbitrary
callback functions.
The solution above is easy to adapt to other functions that might need
a callback, such as (to pick a random example) set_xlim.
See the attached example, which shows the functionality in action.
I've also shown how to handle the calls to start/stop raster in the
renderer that were my previous use case.
-Eric B
before_after_demo.py (2.3 KB)