Automatically run %matplotlib inline in IPython Notebook

后端 未结 7 1605
逝去的感伤
逝去的感伤 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 20:58

    In (the current) IPython 3.2.0 (Python 2 or 3)

    Open the configuration file within the hidden folder .ipython

    ~/.ipython/profile_default/ipython_kernel_config.py
    

    add the following line

    c.IPKernelApp.matplotlib = 'inline'
    

    add it straight after

    c = get_config()
    

提交回复
热议问题