I had the same problem, even I could see how a new application window was created and immediately disappeared.
Simple solution - just check if you have
# Assumes you have imported "matplotlib.pyplot" as "plt"
plt.show()
after the plot
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…