<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Dec 17, 2017, at 3:43 AM, Johann Rohwer <<a href="mailto:jr@sun.ac.za" class="">jr@sun.ac.za</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<div class="moz-cite-prefix">On 16/12/17 23:54, Heiland, Randy wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:7381CEE7-2B14-4C45-BB21-E8AE84B8EC07@iu.edu" class="">
<pre wrap="" class="">Any advice for wanting to do a grid of subplots, with fig.tight_layout(), and with "extra” space at the top for a suptitle? As this simple script demonstrates, there isn’t really any space left at the top after doing tight_layout:

import matplotlib.pyplot as plt

fig, axes = plt.subplots(nrows=1, ncols=2, figsize=(12,4))
ax0, ax1 = axes.flatten()

fig.tight_layout()
plt.suptitle('This is a somewhat long figure title', y=0.99, fontsize=12)
plt.show()
</pre>
</blockquote>
You can adjust the space individually for left, top, right, and bottom, as well as horizontally and vertically between the subplots, with fig.subplots_adjust().
<br class="">
<br class="">
<tt class="">call signature::</tt><tt class=""><br class="">
</tt><tt class=""><br class="">
</tt><tt class="">  subplots_adjust(left=None, bottom=None, right=None, top=None,</tt><tt class=""><br class="">
</tt><tt class="">                  wspace=None, hspace=None)</tt><tt class=""><br class="">
</tt><tt class=""><br class="">
</tt><tt class="">The parameter meanings (and suggested defaults) are::</tt><tt class=""><br class="">
</tt><tt class=""><br class="">
</tt><tt class="">  left  = 0.125  # the left side of the subplots of the figure</tt><tt class=""><br class="">
</tt><tt class="">  right = 0.9    # the right side of the subplots of the figure</tt><tt class=""><br class="">
</tt><tt class="">  bottom = 0.1   # the bottom of the subplots of the figure</tt><tt class=""><br class="">
</tt><tt class="">  top = 0.9      # the top of the subplots of the figure</tt><tt class=""><br class="">
</tt><tt class="">  wspace = 0.2   # the amount of width reserved for blank space between subplots</tt><tt class=""><br class="">
</tt><tt class="">  hspace = 0.2   # the amount of height reserved for white space between subplots</tt><tt class=""><br class="">
</tt><tt class=""><br class="">
</tt><tt class="">The actual defaults are controlled by the rc file</tt><tt class=""><br class="">
</tt><tt class="">File:      /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py</tt><tt class=""><br class="">
</tt><tt class="">Type:      function</tt><tt class=""><br class="">
</tt><tt class=""><br class="">
</tt><tt class=""><br class="">
</tt><br class="">
The integrity and confidentiality of this email is governed by these terms / Die integriteit en vertroulikheid van hierdie e-pos word deur die volgende bepalings gereël.
<a href="http://www.sun.ac.za/emaildisclaimer" class="">http://www.sun.ac.za/emaildisclaimer</a>
</div>
_______________________________________________<br class="">
<br class="">
</div>
</blockquote>
<br class="">
</div>
<div>Thanks very much, Johann. I’d actually played around with subplots_adjust previously and gave up. However, your email nudged me back to it and I do indeed have pretty good results now. And for the record, one would use this *instead* of the tight_layout,
 not in addition to it.</div>
<div><br class="">
</div>
<div>Randy</div>
<div> </div>
<br class="">
</body>
</html>