Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

Astro Coke

[Python] inline backend 와 matplotlibrc 의 충돌 본문

Computer Setup

[Python] inline backend 와 matplotlibrc 의 충돌

astrodoo 2019. 4. 3. 04:19

source: https://stackoverflow.com/questions/35939989/matplotlib-configuration-for-inline-backend-in-jupyter-notebook

The Jupyter/IPython split is confusing. Jupyter is the front end to kernels, of which IPython is the defacto Python kernel. You are trying to change something related to matplotlib and this only makes sense within the scope of the IPython kernel. Making a change to matplotlib in ~/.jupyter/jupyter_notebook_config.py would apply to all kernels which may not make sense (in the case of running a Ruby/R/Bash/etc. kernel which doesn't use matplotlib). Therefore, your c.InlineBackend.rcsetting needs to go in the settings for the IPython kernel.

 

Edit the file ~/.ipython/profile_default/ipython_kernel_config.py and add to the bottom: c.InlineBackend.rc = { }.

Since c.InlineBackend.rc specifies matplotlib config overrides, the blank dict tells the IPython kernel not to override any of your .matplotlibrc settings.

If the file doesn't exist, run ipython profile create to create it.