From 1ae99c5f04b6d14a730bdc8fea2e77d33665cd26 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 14 Dec 2017 12:31:48 +0000 Subject: Add cmake improvement for Persistence representation module. Was bad tested and too hard to maintain git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration_cmake_improvement@3071 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fa4684701edbe6d172e75f119afa912eb3b5dad7 --- .../include/gudhi/Persistence_intervals.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Persistence_representations/include/gudhi/Persistence_intervals.h') diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals.h b/src/Persistence_representations/include/gudhi/Persistence_intervals.h index 525d58a3..1ed97882 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals.h @@ -167,10 +167,10 @@ class Persistence_intervals { // this program create a gnuplot script file that allows to plot persistence diagram. std::ofstream out; - std::ostringstream nameSS; - nameSS << filename << "_GnuplotScript"; - std::string nameStr = nameSS.str(); - out.open(nameStr); + std::stringstream gnuplot_script; + gnuplot_script << filename << "_GnuplotScript"; + + out.open(gnuplot_script.str().c_str()); std::pair min_max_values = this->get_x_range(); if (min_x == max_x) { @@ -195,8 +195,8 @@ class Persistence_intervals { out.close(); - std::cout << "Gnuplot script to visualize persistence diagram written to the file: " << nameStr << ". Type load '" - << nameStr << "' in gnuplot to visualize." << std::endl; + std::cout << "To visualize, install gnuplot and type the command: gnuplot -persist -e \"load \'" + << gnuplot_script.str().c_str() << "\'\"" << std::endl; } /** -- cgit v1.2.3