using two indices to refer to subplot axes when either the number of rows or columns is unity
<p>It is possible to refer to different subplots using two indices to index their axes as in the following example</p>

<pre><code>rows = 2
cols = 2
f, ax = plt.subplots(rows, cols)
x = np.arange(12)
y = xdata**2
plotFunction(x,y,ax,0,1)

def plotFunction(xdata, ydata, ax, i, j):
    ax[i,j].plot(xdata, ydata, marker='o', label='quadratic')
</code></pre>

<p>however if either rows or cols = 1 pyplot does not permit the use of two indices.  This precludes the generic use of my plotting function that relies on double index plotting.  So the following won't work</p>

<pre><code>rows = 1
cols = 2
f, ax = plt.subplots(rows, cols)
x = np.arange(12)
y = xdata**2
plotFunction(x,y,ax,0,1)
</code></pre>