Is there a way I can save a plot to a variable, and show it at multiple points in a notebook? Say I create a plot near the start of a notebook, then wayyyyy further down in the analysis it'd be relevant to look at that plot again.
Something like:
my_plot = plt.plot(plot_params)
plt.show()
Then later call:
plt.clf()
my_plot
plt.show()
This doesn't work, and I'm confused as to why, since the call to plt.plot(plot_params)
should be stored in my_plot
.