src/contrib/gnuplot.cc
changeset 2267 87dd46db981d
parent 2180 8cbdda2a5c2d
child 2519 55057c67d4f6
--- a/src/contrib/gnuplot.cc	Tue Dec 11 17:53:54 2007 +0100
+++ b/src/contrib/gnuplot.cc	Wed Dec 12 09:33:22 2007 +0100
@@ -75,6 +75,13 @@
 }
 
 void 
+Gnuplot::SetLegend (std::string xLegend, std::string yLegend)
+{
+  m_xLegend = xLegend;
+  m_yLegend = yLegend;
+}
+
+void 
 Gnuplot::AddDataset (const GnuplotDataset &dataset)
 {
   m_datasets.push_back (new GnuplotDataset (dataset));
@@ -85,6 +92,8 @@
 {
   os << "set terminal png" << std::endl;
   os << "set output '" << m_pngFilename << "'" << std::endl;
+  os << "set xlabel '" << m_xLegend << "'" << std::endl;
+  os << "set ylabel '" << m_yLegend << "'" << std::endl;
   os << "plot ";
   for (Datasets::const_iterator i = m_datasets.begin (); i != m_datasets.end ();)
     {