Suppose you need to store the figure and subplot variables in variables (to change the attributes later). How can you make the whole figure stay and not disappear immediately after a few milliseconds?
import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(2,2,1) ax.plot(1) fig.show()
source share