title: Matplotlib Figuresize being ignored by rcParams
body: <p>I have previously used the following to ensure my figure-size in my plots is a consistent size:</p>
  
  <pre><code>import matplotlib as mpl
  rc_fonts = {'figure.figsize': (15, 9.3)}
  mpl.rcParams.update(rc_fonts)
  import matplotlib.pylab as plt
  </code></pre>
  
  <p>However, I am now finding that for my usual default values <code>(15, 9.3)</code> this is being ignored. The following demonstrates this: </p>
  
  <pre><code>import matplotlib as mpl
  rc_fonts = {'figure.figsize': (15, 9.3)}
  mpl.rcParams.update(rc_fonts)
  import matplotlib.pylab as plt
  # I draw some boring plot. 
  plt.clf()
  plt.plot(*[range(10)]*2)
  print plt.gcf().get_size_inches()
  print mpl.rcParams['figure.figsize']
  plt.gcf().set_size_inches(15, 9.3, forward=True)
  print plt.gcf().get_size_inches()
  </code></pre>
  
  <p>The initial plot size is <code>[10.35, 9.3]</code> and after it is <code>[15, 9.3]</code> as desired. If however I make the default very much large or smaller, e.g. (32, 19.3) then the figure window is correctly sized. I would like to keep my desired route of changing <code>rcParams</code> to set the default, rather than trying to set it twice by making an interim dummy plot. Is this a bug, or am I going about this the wrong way?</p>
  
  <p>Details:</p>
  
  <ul>
  <li>Python 2.7.12 (inside a virtual environment, a must).</li>
  <li>Backend <code>TkAgg</code> (I want this kept as it is).</li>
  <li>Matplotlib version 2.1.0. (This bug/feature persists in version 2.1.2 also).</li>
  </ul>
  
  <p>PS - I prefer avoiding having to make matplotlib <code>fig</code> and <code>ax</code> objects and instead use the <code>plt</code> interface directly. If possible I would like to keep it this way with any solutions. </p>
  
  <p><strong>Possible known issue:</strong></p>
  
  <p>I have found the following issue <a href="https://github.com/matplotlib/matplotlib/issues/2716" rel="nofollow noreferrer">2716</a> on github which I think is causing this, but there don't appear any fixes suitable for the rcParam settings route. So any help or suggestions are still welcome. </p>
  
  <p><strong>Current output:</strong></p>
  
  <p>Following the comments below is some example output (done using Python 3 to allow me to install the latest version of matplotlib):</p>
  
  <pre><code>Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
  [GCC 5.4.0 20160609] on linux
  &gt;&gt;&gt; 
  ... import matplotlib as mpl
  ... print(mpl.__version__)
  ... rc_fonts = {'figure.figsize': (15, 9.3)}
  ... mpl.rcParams.update(rc_fonts)
  ... import matplotlib.pylab as plt
  ... plt.plot(*[range(10)]*2)
  ... 
  Backend Qt4Agg is interactive backend. Turning interactive mode on.
  2.2.0rc1+124.gf1f83f6
  &gt;&gt;&gt; 
  ... print(plt.gcf().get_size_inches())
  ... print(mpl.rcParams['figure.figsize'])
  ... plt.gcf().set_size_inches(15, 9.3, forward=True)
  ... print(plt.gcf().get_size_inches())
  ... 
  [ 10.35   9.3 ]
  [15.0, 9.3]
  [ 15.    9.3]
  </code></pre>
  
  <p><strong>DEMONSTRATION</strong></p>
  
  <p><a href="https://i.stack.imgur.com/irliP.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/irliP.gif" alt="enter image description here"></a></p>
  
  <p><strong>Root of the problem</strong></p>
  
  <p>As explained in the accepted answer, the issue is that I am using more than one display, and Matplotlib cannot produce a window that is larger than the primary display. Unfortunately changing what Ubuntu considers to be the primary display is currently an unresolved bug. Hence the problem does not lie with Matplotlib, but with Ubuntu. I was able to resolve this issue by setting the display to the top left monitor in my setup. </p>