IPython3 自动配置 %matplotlib inline
IPython3 automatically config %matplotlib inline
我正在使用 IPython 3 / Jupyter,我想默认使用 %matplotlib 选项。
在IPython2中,我在~/.ipython/profile_default/ipython_notebook_config.py
上有下一个选项
c.InteractiveShellApp.matplotlib = 'inline'
但是在IPython3中,这个选项不再可用了。
它也消失了我用来设置图表外观的设置 c.InlineBackend.rc。
现在如何设置这些选项?
不确定这是否适用于您的情况,但您可以试一试:
我正在根据此 tutorial 使用自定义笔记本主题。基本上,我在命令行中输入: ipython profile create customcss
并在 ~/.ipython/profile_default/static/custom
中修改 custom.css 文件
此外,我试图通过在文件夹 ~/.ipython/profile_default/startup
.
中写入一个名为 00_my_imports.py
的文件来摆脱我在每个笔记本的第一个单元格中的个性化和导入
因此,在您的情况下,您可以尝试在启动时执行“%matplotlib inline”行
使用~/.ipython/profile_default/ipython_kernel_config.py
中的选项
编辑文件~/.ipython/profile_default/ipython_config.py
添加行c.InteractiveShellApp.matplotlib = 'inline'
你可能没有这个文件,所以你可以用这个命令创建它
echo "c.InteractiveShellApp.matplotlib = 'inline'" > ipython_config.py
截至 2017 年 4 月,仍然运行良好。
我正在使用 IPython 3 / Jupyter,我想默认使用 %matplotlib 选项。
在IPython2中,我在~/.ipython/profile_default/ipython_notebook_config.py
上有下一个选项c.InteractiveShellApp.matplotlib = 'inline'
但是在IPython3中,这个选项不再可用了。
它也消失了我用来设置图表外观的设置 c.InlineBackend.rc。
现在如何设置这些选项?
不确定这是否适用于您的情况,但您可以试一试:
我正在根据此 tutorial 使用自定义笔记本主题。基本上,我在命令行中输入: ipython profile create customcss
并在 ~/.ipython/profile_default/static/custom
此外,我试图通过在文件夹 ~/.ipython/profile_default/startup
.
00_my_imports.py
的文件来摆脱我在每个笔记本的第一个单元格中的个性化和导入
因此,在您的情况下,您可以尝试在启动时执行“%matplotlib inline”行
使用~/.ipython/profile_default/ipython_kernel_config.py
编辑文件
~/.ipython/profile_default/ipython_config.py
添加行
c.InteractiveShellApp.matplotlib = 'inline'
你可能没有这个文件,所以你可以用这个命令创建它
echo "c.InteractiveShellApp.matplotlib = 'inline'" > ipython_config.py
截至 2017 年 4 月,仍然运行良好。