今日份学习:jupyter notebook magic
查看可用魔法命令:
# jupyter notebook cell 使用
%lsmagic
查看命令帮助:
# %cmd? 例如:%run? %matplotlib
%run?
Docstring:
Run the named file inside IPython as a program.
Usage::
%run [-n -i -e -G]
[( -t [-N<N>] | -d [-b<N>] | -p [profile options] )]
( -m mod | file ) [args]
%matplotlib?
Docstring:
::
%matplotlib [-l] [gui]
Set up matplotlib to work interactively.
This function lets you activate matplotlib interactive support at any point during an IPython session. It does not import anything into the interactive namespace.
Examples:
To enable the inline backend for usage with the IPython Notebook::
In [1]: %matplotlib inline
今天用到了 %matplotlib inline
,功能是使用matplotlib画图时,图片嵌入在jupyter notebook里面,不以单独窗口显示。