I'm working with matplotlib to build a very basic GUI around a statistical model/simulation. I'd like to add a timer of this sort, to allow for some animation. Problem: the way my objects are set up, I have easy access to MPL axes objects, but not canvasses.
Is there a method to get the get parent canvas for axes in matplotlib? Seems like the simplest way to solve this problem.
Alternatively, is there an obvious workaround? I'm pretty new to matplotlib.
It's just ax.figure.canvas
.
e.g.
import matplotlib.pyplot as plt
ax = plt.gca()
canvas = ax.figure.canvas
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With