matplotlib configuration for inline backend in jupyter notebook

后端 未结 5 1501
醉酒成梦
醉酒成梦 2020-12-14 09:14

I\'d like to learn how to configure the defaults for matplotlib using the inline backend in jupyter notebook. Specifically, I\'d like to set default \'figure.figsize’ to [7.

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-14 09:47

    For jupyter 5.x and above with IPython kernels, you can just override particular keys and leave the rest by putting things like this, with your desired figsize in your ~/.ipython/profile_default/ipython_kernel_config.py:

    c = get_config()
    c.InlineBackend.rc.update({"figure.figsize": (12, 10)})
    

提交回复
热议问题