Inside a GUI such as an IPython notebook, you may not need to call plt.show() depending on how the GUI is configured. If you run the Python script from the command line, then you would have to call plt.show()
有一些GUI的环境里面执行,会自动的去展示相关的结果,但是在命令行里面,就需要手动的调用plt.show()