|
@@ -143,7 +143,7 @@ Gnuplot::Gnuplot(const std::string &title, const std::string &style,
|
|
|
|
|
|
void Gnuplot::checkSystemVariablesOpenGnuplotCommand()
|
|
|
{
|
|
|
-
|
|
|
+#ifndef WIN32
|
|
|
if (!this->get_program_path("gnuplot"))
|
|
|
{
|
|
|
this->valid = false;
|
|
@@ -165,10 +165,14 @@ void Gnuplot::checkSystemVariablesOpenGnuplotCommand()
|
|
|
}
|
|
|
this->nplots = 0;
|
|
|
this->valid = true;
|
|
|
+#else
|
|
|
+ throw std::exception("function not yet ported for win32");
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
Gnuplot::~Gnuplot()
|
|
|
{
|
|
|
+#ifndef WIN32
|
|
|
if (pclose(this->gnucmd) == -1)
|
|
|
cerr << "Problem closing communication to gnuplot" << endl;
|
|
|
if ((this->to_delete).size() > 0)
|
|
@@ -178,6 +182,9 @@ Gnuplot::~Gnuplot()
|
|
|
to_delete.clear();
|
|
|
}
|
|
|
return;
|
|
|
+#else
|
|
|
+ throw std::exception("function not yet ported for win32");
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
bool Gnuplot::is_valid(void)
|
|
@@ -187,6 +194,7 @@ bool Gnuplot::is_valid(void)
|
|
|
|
|
|
bool Gnuplot::get_program_path(const std::string pname)
|
|
|
{
|
|
|
+#ifndef WIN32
|
|
|
list<string> ls;
|
|
|
char *path;
|
|
|
|
|
@@ -207,6 +215,9 @@ bool Gnuplot::get_program_path(const std::string pname)
|
|
|
}
|
|
|
}
|
|
|
return false;
|
|
|
+#else
|
|
|
+ throw std::exception("function not yet ported for win32");
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
void Gnuplot::reset_plot(void)
|
|
@@ -382,6 +393,7 @@ void Gnuplot::plot_equation(const std::string &equation,
|
|
|
|
|
|
void Gnuplot::plot_x(vector<double> d, const std::string &title)
|
|
|
{
|
|
|
+#ifndef WIN32
|
|
|
ofstream tmp;
|
|
|
std::ostringstream cmdstr;
|
|
|
char name[] = "/tmp/gnuplotiXXXXXX";
|
|
@@ -440,6 +452,9 @@ void Gnuplot::plot_x(vector<double> d, const std::string &title)
|
|
|
this->nplots++;
|
|
|
|
|
|
return;
|
|
|
+#else
|
|
|
+ throw std::exception("function not yet ported for win32");
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
void Gnuplot::plot_xy(map<double, double> xy, const std::string &title)
|
|
@@ -458,6 +473,7 @@ void Gnuplot::plot_xy(map<double, double> xy, const std::string &title)
|
|
|
void Gnuplot::plot_xy(vector<double> x, vector<double> y,
|
|
|
const std::string &title)
|
|
|
{
|
|
|
+#ifndef WIN32
|
|
|
ofstream tmp;
|
|
|
std::ostringstream cmdstr;
|
|
|
char name[] = "/tmp/gnuplotiXXXXXX";
|
|
@@ -521,11 +537,15 @@ void Gnuplot::plot_xy(vector<double> x, vector<double> y,
|
|
|
this->nplots++;
|
|
|
|
|
|
return;
|
|
|
+#else
|
|
|
+ throw std::exception("function not yet ported for win32");
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
void Gnuplot::plot_xyz(vector<double> x, vector<double> y, vector<double> z,
|
|
|
const std::string &title)
|
|
|
{
|
|
|
+#ifndef WIN32
|
|
|
ofstream tmp;
|
|
|
std::ostringstream cmdstr;
|
|
|
char name[] = "/tmp/gnuplotiXXXXXX";
|
|
@@ -593,6 +613,9 @@ void Gnuplot::plot_xyz(vector<double> x, vector<double> y, vector<double> z,
|
|
|
this->nplots++;
|
|
|
|
|
|
return;
|
|
|
+#else
|
|
|
+ throw std::exception("function not yet ported for win32");
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -602,7 +625,7 @@ void Gnuplot::plot_xyz(vector<double> x, vector<double> y, vector<double> z,
|
|
|
void Gnuplot::plot_image(unsigned char * ucPicBuf, int iWidth, int iHeight,
|
|
|
const std::string &title)
|
|
|
{
|
|
|
-
|
|
|
+#ifndef WIN32
|
|
|
ofstream tmp;
|
|
|
std::ostringstream cmdstr;
|
|
|
char name[] = "/tmp/gnuplotiXXXXXX";
|
|
@@ -670,6 +693,8 @@ void Gnuplot::plot_image(unsigned char * ucPicBuf, int iWidth, int iHeight,
|
|
|
this->nplots++;
|
|
|
|
|
|
return;
|
|
|
-
|
|
|
+#else
|
|
|
+ throw std::exception("function not yet ported for win32");
|
|
|
+#endif
|
|
|
}
|
|
|
|