title: Axes from plt.subplots() is a "numpy.ndarray" object and has no attribute "plot"
body: <blockquote>
    <p>The information below may be superfluous if you are trying to understand the error message. Please start off by reading <a href="https://stackoverflow.com/a/37968229/6292000">the answer</a>
     by <strong>@user707650</strong>.</p>
  </blockquote>
  
  <p>Using MatPlotLib, I wanted a generalizable script that creates the following from my data. </p>
  
  <p>A window containing <strong><em>a</em></strong> subplots arranged so that there are <strong><em>b</em></strong> subplots per column. I want to be able to change the values of <strong><em>a</em></strong> and <strong><em>b</em></strong>. </p>
  
  <p>If I have data for <strong><em>2a</em></strong> subplots, I want 2 windows, each with the previously described "<strong><em>a</em></strong> subplots arranged according to <strong><em>b</em></strong> subplots per column".</p>
  
  <p>The x and y data I am plotting are floats stored in np.arrays and are structured as follows:</p>
  
  <ul>
  <li><p>The x data is always the same for all plots and is of length 5.</p>
  
  <pre><code> 'x_vector': [0.000, 0.005, 0.010, 0.020, 0.030, 0.040]
  </code></pre></li>
  <li><p>The y data of all plots are stored in <strong>y_vector</strong> where the data for the first plot is stored at indexes 0 through 5. The data for the second plot is stored at indexes 6 through 11. The third plot gets 12-18, the fourth 19-24, and so on.</p></li>
  </ul>
  
  <p>In total, for this dataset, I have 91 plots (i.e. 91*6 = 546 values stored in y_vector). </p>
  
  <p><strong>Attempt:</strong></p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  # Options:
  plots_tot = 14 # Total number of plots. In reality there is going to be 7*13 = 91 plots.
  location_of_ydata = 6 # The values for the n:th plot can be found in the y_vector at index 'n*6' through 'n*6 + 6'.
  plots_window = 7 # Total number of plots per window.
  rows = 2 # Number of rows, i.e. number of subplots per column.
  
  # Calculating number of columns:
  prim_cols = plots_window / rows
  extra_cols = 0
  if plots_window % rows &gt; 0:
      extra_cols = 1
  cols = prim_cols + extra_cols
  
  print 'cols:', cols
  print 'rows:', rows
  
  # Plotting:
  n=0
  x=0
  fig, ax = plt.subplots(rows, cols)
  while x &lt;= plots_tot:
      ax[x].plot(x_vector, y_vector[n:(n+location_of_ydata)], 'ro')
      if x % plots_window == plots_window - 1:
          plt.show() # New window for every 7 plots.
      n = n+location_of_ydata
      x = x+1
  </code></pre>
  
  <p><strong>I get the following error:</strong></p>
  
  <pre><code>cols: 4
  rows: 2
  Traceback (most recent call last):
    File "Script.py", line 222, in &lt;module&gt;
      ax[x].plot(x_vector, y_vector[n:(n+location_of_ydata)], 'ro')
  AttributeError: 'numpy.ndarray' object has no attribute 'plot'
  </code></pre>