8

I just upgraded my Jupyter version to 4.2.1 and it seems as though inline figures have gotten a lot larger for the same figsize.

Am I imagining this?

Can I change that without changing the figsize?

Shahar
  • 886
  • 1
  • 10
  • 22

2 Answers2

19

You can use top-level matplotlib settings like this:

import matplotlib as mpl

mpl.rcParams['figure.figsize'] = (10,10)

This will change default figure size to 10x10. More on that in the documentation: http://matplotlib.org/users/customizing.html

Sergey Antopolskiy
  • 3,970
  • 2
  • 24
  • 40
  • 3
    I think you are missing my point. The default figsize was and still is 8 by 6 inches. The display size of the figure is much larger now than with previous versions. I think it has something to do with the CSS of the notebook template that has changed. – Shahar Jan 21 '17 at 09:39
  • Yes, I am sorry, I must've blanked out (sleep deprivation?), now I see that your question is completely different. – Sergey Antopolskiy Jan 21 '17 at 10:52
9

The scaling of the figure for figures with %matplotlib inline depends on the figure.dpi parameter. So if your figures are to small and you do not want to increase the figsize then you can just set

import matplotlib.pyplot as plt
plt.rcParams['figure.dpi'] = 150 # default for me was 75

I also had the impression that the scaling changed at some point, but I guess this can also appear if you change your screen/resolution.

AS1
  • 1,115
  • 1
  • 9
  • 7