title: GNUplot stdin, how to plot multiple lines?
body: <p>OK so I am piping data into GNUplot in the form of, e.g:</p>
  
  <pre><code>2013-11-04 20:00:12,875,350,112,29,38,4,44,10,632,121
  </code></pre>
  
  <p><strike>I have set the following in my Python code:</p>
  
  <pre><code>gnuplot.stdin.write("plot '-' u 1:2 t 'aa',\
  '' u 1:3 t 'aa in',\
  '' u 1:4 t 'bb',\
  '' u 1:5 t 'bb in',\
  '' u 1:6 t 'cc',\
  '' u 1:7 t 'cc in',\
  '' u 1:8 t 'dd',\
  '' u 1:9 t 'dd in',\
  '' u 1:10 t 'ee';\n")
  </code></pre>
  
  <p></strike>
  However I keep getting errors such as:</p>
  
  <pre><code>gnuplot&gt; plot '-' u 1:2 t 'aa',    '' u 1:3 t 'aa in',    '' u 1:4 t 'bb',    '' u 1:5 t 'bb in',    '' u 1:6 t 'cc',    '' u 1:7 t 'cc in',    '' u 1:8 t 'dd',    '' u 1:9 t 'dd in',    '' u 1:10 t 'ee';
                                                     ^
           line 1271: warning: Skipping data file with no valid points
  </code></pre>
  
  <p><strike>Any ideas?</strike></p>
  
  <p><strike>###UPDATE:###</p>
  
  <p>Based on @Christoph's feedback; here's the code I'm currently using:</p>
  
  <pre><code>cur.execute(sql)
  data = cur.fetchall()
  
  c = 0            
  for k in data:
      dataElement = data[c]    
      gnuplot.stdin.write("plot '-' u 1:2 t 'aa',\
      '' u 1:3 t 'aa in',\
      '' u 1:4 t 'bb',\
      '' u 1:5 t 'bb in',\
      '' u 1:6 t 'cc',\
      '' u 1:7 t 'cc in',\
      '' u 1:8 t 'dd',\
      '' u 1:9 t 'dd in',\
      '' u 1:10 t 'ee';\n")
  
      gnuplot.stdin.write("%s,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i\n" % dataElement[:])
      gnuplot.stdin.write("e\n")
      c = c + 1
  </code></pre>
  
  <p></strike></p>