title: plotting too many lines in matplotlib: out of memory
body: <p>I need to plot ~2000x300 lines within a single plot.
  e.g. something like that, but with 300 curves (each of 2000 datapoints) instead of four shown here:
  <a href="https://i.stack.imgur.com/J7rvw.png" rel="nofollow noreferrer">example plot</a></p>
  
  <p>First I set up the figure:</p>
  
  <pre><code>fig, ax = plt.subplots(figsize=(8, 8))
  </code></pre>
  
  <p>Then I do the following for many times:</p>
  
  <pre><code>drawnLine = plt.Line2D([Xstart, Xfinish], [Ystart,Yfinish], 1, linestyle='solid', color='b')
  ax.add_artist(drawnLine)
  </code></pre>
  
  <p>and in the end I wanted to do:</p>
  
  <pre><code>fig.savefig(ExpFolder + 'NewFig.png')
  </code></pre>
  
  <p>However the script reaches the 8GB memory limits and stops.</p>