title: Why do many examples use `fig, ax = plt.subplots()` in Matplotlib/pyplot/python
body: <p>I'm learning to use <code>matplotlib</code> by studying examples, and a lot of examples seem to include a line like the following before creating a single plot...</p>
  
  <pre><code>fig, ax = plt.subplots()
  </code></pre>
  
  <p>Here are some examples...</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/11244514/modify-tick-label-text">Modify tick label text</a></li>
  <li><a href="http://matplotlib.org/examples/pylab_examples/boxplot_demo2.html" rel="noreferrer">http://matplotlib.org/examples/pylab_examples/boxplot_demo2.html</a></li>
  </ul>
  
  <p>I see this function used a lot, even though the example is only attempting to create a single chart. Is there some other advantage? The official demo for <code>subplots()</code> also uses <code>f, ax = subplots</code> when creating a single chart, and it only ever references ax after that. This is the code they use.</p>
  
  <pre><code># Just a figure and one subplot
  f, ax = plt.subplots()
  ax.plot(x, y)
  ax.set_title('Simple plot')
  </code></pre>