make figure show on the screen after plt.imshow() or plt.plot()

after plt.imshow() or plt.plot(), the figure won't show on the screen until you call plt.show() function,
I add plt.show() after each plt.imshow() or plt.plot(), make the doc code more clearly