summaryrefslogtreecommitdiff
path: root/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-12-09 12:47:11 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-12-09 12:47:11 +0000
commitca8474aa59374fc5f4266aa56196587685b86637 (patch)
tree6cb78f32bbe0bcb4f5c689626d540cda4168aff8 /src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h
parent2cfcdc6d74a2bae0655234f71f41a80a3351e3c4 (diff)
CMake modification strategy as it was quite painful to maintain all these utilities
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration_cmake_improvement@3062 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: c0eae764abe5c7076ae59027eeab2a7ad451463c
Diffstat (limited to 'src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h')
-rw-r--r--src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h
index 4ceb9bf6..84fd22ed 100644
--- a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h
+++ b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h
@@ -1207,10 +1207,9 @@ void Persistence_landscape_on_grid::plot(const char* filename, double min_x, dou
// 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::ostringstream gnuplot_script;
+ gnuplot_script << filename << "_GnuplotScript";
+ out.open(gnuplot_script.str().c_str());
if (min_x == max_x) {
std::pair<double, double> min_max = compute_minimum_maximum();
@@ -1241,7 +1240,6 @@ void Persistence_landscape_on_grid::plot(const char* filename, double min_x, dou
out << "plot ";
for (size_t lambda = from; lambda != to; ++lambda) {
- // out << " '-' using 1:2 title 'l" << lambda << "' with lp";
out << " '-' using 1:2 notitle with lp";
if (lambda + 1 != to) {
out << ", \\";
@@ -1261,8 +1259,8 @@ void Persistence_landscape_on_grid::plot(const char* filename, double min_x, dou
}
out << "EOF" << std::endl;
}
- 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;
}
template <typename T>