Configuring Jupyter notebooks for inline Retina Ma

2019-03-10 07:09发布

I want the effect of

import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
%config InlineBackend.figure_format='retina'

at the launch of all my Jupyter notebooks, but I can't figure out what the current approach is for accomplishing this. There are many answers here and elsewhere, but none that I can find seem to be up to date.

How do I accomplish the above in the current versions of Jupyter notebooks (but not IPython generally!): what settings should I apply where is the configuration file I should put them in?


I've tried

c.InteractiveShellApp.matplotlib = "inline"
c.InlineBackend.figure_formats = set(['retina'])

in

~/.jupyter/jupyter_notebook_config.py

but this has no effect.

1条回答
2楼-- · 2019-03-10 07:25

I have

c.IPKernelApp.matplotlib = 'inline'
c.InlineBackend.figure_format = 'retina'

in my ~/.ipython/profile_default/ipython_kernel_config.py.

查看更多
登录 后发表回答