title: pipe plot data to gnuplot script
body: <p>I want to create a gnuplot with three plots in it.
  The data should be inline (as I want to only </p>
  
  <p>It should look like this:</p>
  
  <p><img src="https://s22.postimg.cc/qcc94e1i9/test.png" alt="https://s22.postimg.cc/qcc94e1i9/test.png"></p>
  
  <p>Currently I am using the following gnuplot script to create the plot:</p>
  
  <pre><code>set terminal png
  set output "test.png"
  plot for[col=2:4] "data.txt" using 1:col title columnheader(col) with lines
  </code></pre>
  
  <p>The file <code>data.txt</code> is:</p>
  
  <pre><code>Generation Best Worst Average
  0 2 1 0
  1 3 1 2
  2 4 3 3
  3 4 3 3
  4 6 3 4
  5 7 4 5
  6 9 6 7
  7 10 6 9
  8 10 5 6
  9 11 6 8
  10 12 7 9
  </code></pre>
  
  <p>I would like to pipe the data.txt into gnuplot and not to rely on the referenced data file in the script.
  Something like <code>cat data.txt | gnuplot plot.gnu</code>.
  The reason for this is, that I have several <code>data.txt</code> files and don't want to build a <code>plot.gnu</code> file for each of these.</p>
  
  <p>I read about the special <code>'-'</code> file <a href="https://stackoverflow.com/questions/3318228/gnuplotting-data-without-a-textfile">in this stackoverflow thread</a> and I read about <a href="http://xmodulo.com/2013/01/how-to-plot-data-without-data-files-in-gnuplot.html" rel="noreferrer">multiple plots in one file</a>. However this would require to include the data with the gnuplot code, which isn't clean.</p>