ipython notebook中有一个相当方便的语句: %matplotlib inline,可以实现运行cell即出现结果图像。但是如果想写在Python程序内,貌似直接%matplotlib inline是不可行的。

这种情况下,如果想显示图像,需要加上一句: plt.show()。 当然确保你导入了对应的库: import matplotlib.pyplot as plt

相关文章:

  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
  • 2021-05-24
  • 2022-12-23
猜你喜欢
  • 2021-12-27
  • 2021-11-15
  • 2021-07-13
  • 2021-06-25
  • 2021-12-02
相关资源
相似解决方案