I am a beginner in Python and have a very basic question.
In the matplot library we have show() function. I just want to know what is the benefit of using show() function.
For ex. if we have multiple statements such as
plt.scatter(XX,YY)
plt.plot(X,Y)
plt.show() #3rd statement, is it necessary?
We can plot a scatter plot and can superimpose plot on it just by executing these two statements. Whether we write the 3rd statement i.e. plt.show() hardly matters. Does it matter? When do we use plt.show().
Please explain. Thank You.