jupyter 代码到 pycharm 的迁移

Matplotlib 图表不能在 Pycharm 中显示的问题
在用 IPython 的时候,可以使用类似: %matplotlib inline
解决方法:加入了plt.show(),可以将生成的图像显示出来。

另外,IPython的内置magic函数包括三种:

  1. 伴随你的代码使用的函数:%run, %edit, %save, %macro, %recall等;
  2. 可以影响到脚本本身的函数:%colors, %xmode, %autoindent, %automagic等;
  3. 其他的函数: %reset, %timeit, %%writefile, %load, %paste。

https://blog.csdn.net/xinluqishi123/article/details/63523531

猜你喜欢

转载自blog.csdn.net/s1162276945/article/details/87727809
今日推荐