title: Unable to plot due to size of x and y arrays
body: <p>I am trying to produce a number of plots of temperature (te) versus time (t), where for each plot, a different timestep (dt) is used to calculate the temperature. <a href="https://i.stack.imgur.com/ntDVI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ntDVI.png" alt="original plot"></a>. Initially my code ran fine and I produced the plot shown (the plot is made up of a number of plots, more visible when zoomed in). However after making an adjustment to my values for dt_values I have not been able to run the code, and am getting the 'x and y must have same first dimension' error message but I cannot see why. </p>
  
  <pre><code>import numpy as np 
  import matplotlib.pyplot as plt
  
  
  r = 0.024 #cooling rate per minute
  te_init = 90.0
  
  te_surr = 17
  
  dt_values = [0.05, 0.025, 0.01, 0.005, 0.001]
  
  for j in dt_values:
      t = np.arange(0,100,j)
      te = np.zeros(len(t))
      te[0] = te_init 
  
      def f(te):
          y = -r*(te - te_surr) # y is the derivative
          return y
      for i in range(1,len(t)):
          te[i] = te[i-1] + f(te[i-1])*j
          plt.plot(t, te[i], label = j)
          plt.xlabel('Time, [min]')
          plt.ylabel('Temperature, [C]')
          plt.title('Adaptive Time Steps')
          plt.legend(loc=4)
  </code></pre>