1

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.

2
  • A question in the same direction with a more condensed answer, but focussing on the background instead of the figure size would be this one. Commented Aug 8, 2017 at 17:37
  • Thanks, all those links helped! Commented Aug 8, 2017 at 22:01

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.