Since the following code will show a plot without plt.show()
, what is the point of plt.show()
?
Please tell me when plt.show()
is required as this would allow me to appreciate the intricacy of matplotlib better.
N.B.: I'm using this in Spyder (Anaconda)
import matplotlib.pyplot as plt
plt.subplot(211) # the first subplot in the first figure
plt.plot([1, 2, 3])
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…