美文网首页
Jupyter notebook 魔法命令之 %matplotl

Jupyter notebook 魔法命令之 %matplotl

作者: QWERDF007 | 来源:发表于2019-04-16 13:08 被阅读0次

    今日份学习: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里面,不以单独窗口显示。

    相关文章

      网友评论

          本文标题:Jupyter notebook 魔法命令之 %matplotl

          本文链接:https://www.haomeiwen.com/subject/buxbwqtx.html