When using matplotlib:
from matplotlib import pyplot as plt
figure = plt.figure()
ax = figure.add_subplot(111)
ax.plot(x,y)
figure.show() # figure is shown in GUI
# How can I view the figure again after I closed the GUI window?
figure.show() # Exception in Tkinter callback... TclError: this isn't a Tk application
figure.show() # nothing happened
So my questions are:
How can I get the previous plot back if I have called figure.show()?
Is there a more convenient alternative to
figure.add_suplot(111)
if I have multiple figures and thusfrom pylab import *; plot(..); show()
seems not a solution I'm looking for.
And what I eagerly want is
showfunc(stuff) # or
stuff.showfunc()
where stuff
is an object containing all the plots arranged in one picture, and showfunc
is STATELESS(I mean, each time I call it, I behaves as if it's first time called). Is this possible when working with matplotlib
?