title: Plotting list of lists in a same graph in Python
body: <p>I am trying to plot <code>(x,y)</code> where as <code>y = [[1,2,3],[4,5,6],[7,8,9]]</code>.</p>
  <p>Say, <code>len(x) = len(y[1]) = len(y[2])</code>..
  The length of the y is decided by the User input. I want to plot multiple plots of y in the same graph i.e, <code>(x, y[1],y[2],y[3],...)</code>. When I tried using loop it says <code>dimension error</code>.</p>
  <p>I also tried: <code>plt.plot(x,y[i] for i in range(1,len(y)))</code></p>
  <p>How do I plot ? Please help.</p>
  <pre><code>for i in range(1,len(y)):
      plt.plot(x,y[i],label = 'id %s'%i)
      plt.legend()
      plt.show()
  </code></pre>