title: understanding matplotlib.subplots python
body: <p>I have constructed a set of pie charts with some help <a href="https://stackoverflow.com/questions/44528024/insert-image-into-pie-chart-slice">Insert image into pie chart slice</a> 
  My charts look wonderful, now I need to place all 6 of them in a 2x3 figure with common tick marks on the shared x and y axis.
  For starting I am looking at subplots and thought I could get it to work. I downloaded some examples and started to try a few things.</p>
  
  <pre><code>    f, (a) = (plt.subplots(nrows=1, ncols=1, sharex=True, sharey=True))#,
                   #squeeze=False, subplot_kw=None, gridspec_kw=None))
      print(type(f),'\n',type(a),'\n')#,type(b))
  </code></pre>
  
  <p>yields:</p>
  
  <p>class 'matplotlib.figure.Figure'</p>
  
  <p>class 'matplotlib.axes._subplots.AxesSubplot'</p>
  
  <p>while:</p>
  
  <pre><code>    f, (a) = (plt.subplots(nrows=1, ncols=1, sharex=True, sharey=True, squeeze=False, subplot_kw=None, gridspec_kw=None))
      print(type(f),'\n',type(a),'\n')#,type(b))
  </code></pre>
  
  <p>returns:</p>
  
  <p>class 'matplotlib.figure.Figure'</p>
  
  <p>class 'numpy.ndarray'</p>
  
  <p>When I do this:</p>
  
  <pre><code>f, (a,b) = (plt.subplots(nrows=2, ncols=1, sharex=True, sharey=True, squeeze=False, subplot_kw=None, gridspec_kw=None))
      print(type(f),'\n',type(a),'\n',type(b))
  </code></pre>
  
  <p>I get the similar results, however if nrows=1 and ncols=2 I get an error:</p>
  
  <pre><code>    f, (a,b) = (plt.subplots(nrows=1, ncols=2, sharex=True, sharey=True, squeeze=False, subplot_kw=None, gridspec_kw=None))
      print(type(f),'\n',type(a),'\n',type(b))
  </code></pre>
  
  <p>ValueError: not enough values to unpack (expected 2, got 1)</p>
  
  <p>but again this:</p>
  
  <pre><code>    f, (a , b) = (
      plt.subplots(nrows=1, ncols=2, sharex=True, sharey=True))#,
                   #squeeze=False, subplot_kw=None, gridspec_kw=None))
      print(type(f),'\n',type(a),'\n',type(b))
  </code></pre>
  
  <p>gives
  class 'matplotlib.figure.Figure'</p>
  
  <p>class 'matplotlib.axes._subplots.AxesSubplot'</p>
  
  <p>class 'matplotlib.axes._subplots.AxesSubplot'</p>
  
  <p>Why is it either or array or axes, and also why does a 2X1 work and a 1X2 does not?
  I wish to high heaven I could better understand the documentation. Thanks.</p>