I've been wanting to store two plots as vars. I've tried(when creating them):
x = np.arange(0.2,10,0.01)
y = x+2
plt.figure(1) //maybe this could work
plt.plot(x,y)
This would plot correct and then another one
plt.figure(2) //changing the var maybe
y = x**2
plt.plot(x,y) //plotting different one
But then I write plt.figure(1) again but the first plot doesn't show up. What I don't want is to change the y var again to be able to plot the 1st plot (as the x var is the same on both, only the y one changes)
How can I implement a solution to this? Thanks