目前,matplotlib的默认后端是'module://ipykernel.pylab.backend_inline'
。
我想将其切换为TkAGG
。我编辑了matplotlibrc
文件:
~/anaconda2/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc/
加入了:
backend : TkAgg
这确实在python中切换了backend
,但在Jupyter
中没有变化。
目前每次在Jupyter
中启动新的notebook时,都需要执行%matplotlib tk
命令。有没有一种好的方法来使TkAGG
成为Jupyter
的默认后端?