Automatically run %matplotlib inline in IPython Notebook

后端 未结 7 1420
逝去的感伤
逝去的感伤 2020-11-28 20:06

Every time I launch IPython Notebook, the first command I run is

%matplotlib inline

Is there some way to change my config file so that when

相关标签:
7条回答
  • 2020-11-28 21:09

    Further to @Kyle Kelley and @DGrady, here is the entry which can be found in the

    $HOME/.ipython/profile_default/ipython_kernel_config.py (or whichever profile you have created)

    Change

    # Configure matplotlib for interactive use with the default matplotlib backend.
    # c.IPKernelApp.matplotlib = none
    

    to

    # Configure matplotlib for interactive use with the default matplotlib backend.
    c.IPKernelApp.matplotlib = 'inline'
    

    This will then work in both ipython qtconsole and notebook sessions.

    0 讨论(0)
提交回复
热议问题