title: Matplotlib plotting generators
body: <p>It plots when I do (in Python 3):</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  a = [1,2,3,4,5]
  
  plt.plot(range(5), a)
  plt.show()
  </code></pre>
  
  <p>As far as I know, in Python 3, <code>range()</code> returns an iterator so my code above pretty much plots over an iterator. Now my question is, why am I not able to do:</p>
  
  <pre><code>def myGen(iterable):
      for i in iterable:
          yield i
  a = myGen([1,2,3,4,5])
  plt.plot(range(5),a)
  plt.show()
  </code></pre>
  
  <p>When I try this, I get <code>ValueError: x and y must have same first dimension</code></p>
  
  <p>When you think about it, it makes sense wanting to plot over two generators. Just plot point after point. Is this possible in <code>matplotlib</code>?</p>
  
  <p>I am aware that <a href="https://stackoverflow.com/questions/28098342/plotting-in-matplotlib-from-a-generator">there is a similar thread</a>, unfortunately unanswered.</p>