I am trying to add some custom behaviors and properties to my shapes, but it's hard for me to decide on an efficient (and Pythonic) approach.
My first impulse is just to subclass matplotlib.figure.Figure, but I can’t figure out how to do it: usually I create new shapes and start my plot with something like
fig, ax = matplotlib.pyplot.subplots()
and I can't figure out how this will work with a custom subclass Figure.
How can I subclass Figurein such a way as to still use methods pyplotsimilar to those described above? Does even subclass the correct way to get custom behavior associated with a figure? Are the best approaches?
orome source
share