I wanted to know the basic backbone process going on between plt.plot(x,y)
and plt.show()
commands of matplotlib.pyplot.
To elaborate it a bit, the piece of code:
plt.plot(x , y)
plt.show()
show the desired graph (no problem with that).
Also, the code:
plt.plot(x , y)
plt.plot(p , q)
plt.show()
works fine as well. It shows the two plots created by the lists x & y and p & q.
Now here is something that I found very interesting when coding dynamically in ipython.
In [73]: plt.plot(x , y)
#normal plotting function.
In [78]: plt.show()
#shows a graph as intended.
In [79]: plt.show()
#shows nothing.
Now, no matter how many times I call plt.show()
(after I've called it once) it doesn't display the graph at all. Why is so?.
PS: To my understanding maybe there is an object being created and deleted withing this process. But neither I'm sure nor convinced.
Thanks in advance.