title: Passing data from C++ to gnuplot example (using Gnuplot-iostream interface)
body: <p>I have just come accross Dan Stahlke's gnuplot C++ I/O interface, which saves me from "rolling my own". Unfortunately, there are not too may examples and there ios no real documentation.</p>
  
  <p>I have the following data types in my C++ project:</p>
  
  <pre><code>struct Data
  {
    std::string datestr;  // x axis value
    float f1;             // y axis series 1
    float f2;             // y axis series 2
    float f3;             // y axis series 3
  };
  
  
  typedef std::vector&lt;Data&gt; Dataset;
  </code></pre>
  
  <p>I want to pass a Dataset variable from C++, so that I can plot the data (dates on the X axis, and the 3 numbers plotted as time series on the Y axis).</p>
  
  <p>Can anyone show me how to transfer the Dataset variable from C++ to gnuplot (using the Gnuplot-iostream interface) and make a simple plot using the passed in data?</p>