【发布时间】:2019-07-26 18:25:20
【问题描述】:
我正在寻找一种方法来配置我的默认笔记本设置并设置绘图和图形的大小,这样我就不必为每个笔记本单独手动设置。
我知道像How to set the matplotlib figure default size in ipython notebook? 这样的问题详细说明了如何使用jupyter_notebook_config.py。
但这不起作用,大概是因为我在笔记本中重新导入了 pyplot。有没有更好的方法来设置默认设置、行为、选项等?
【问题讨论】:
-
在导入 pyplot 后使用
plt.rc('figure', figsize=(20.0, 10.0))(如建议的那样)怎么样? -
@JoshFriedlander 将
plt.rc('figure', figsize=(20.0, 10.0))添加到~/.ipython/profile_default/startup/startup.ipy无效。 -
我希望在启动笔记本服务器时设置一些参数。 似乎是
jupyter_notebook_config.py的用途,但在那里添加命令并没有成功。
标签: python matplotlib jupyter-notebook