I am running the latest versions of Python (3.5.2), IPython (6.1.0), and Jupyter (--version says 4.3.0 and pip3 shows 5.1.0) on Ubuntu.
Here is a quick example that illustrates the issue that appears in Jupyter. I changed the default figure.figsize
in the matplotlibrc file.
import matplotlib
print(matplotlib.matplotlib_fname())
print(matplotlib.rcParams['figure.figsize'])
$USER/.config/matplotlib/matplotlibrc
[24.0, 13.5]
But as soon as I import the pyplot
submodule, the parameters change back to default:
import matplotlib.pyplot as plt
print(matplotlib.matplotlib_fname())
print(matplotlib.rcParams['figure.figsize'])
$USER/.config/matplotlib/matplotlibrc
[6.0, 4.0]
Why is this happening and how can I use custom params together with plt
?
My question might be similar to this issue that was not resolved.