summaryrefslogtreecommitdiff
path: root/src/python/example/rips_complex_diagram_persistence_from_off_file_example.py
diff options
context:
space:
mode:
authorVincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com>2019-11-21 10:29:52 +0100
committerGitHub <noreply@github.com>2019-11-21 10:29:52 +0100
commitc8a4a15a88a8db5b8824bcee6d22d552dfdfe625 (patch)
tree85c4f8baf7b96b6929e78072d60e18a5914887a1 /src/python/example/rips_complex_diagram_persistence_from_off_file_example.py
parent445a217f4869c62888a20302491b085fbcaabd1b (diff)
parent1e3b4f6c56409dde933341701575dc105ede12db (diff)
Merge pull request #119 from VincentRouvreau/persistence_graphical_tool_improvements
Persistence graphical tool improvements
Diffstat (limited to 'src/python/example/rips_complex_diagram_persistence_from_off_file_example.py')
-rwxr-xr-xsrc/python/example/rips_complex_diagram_persistence_from_off_file_example.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/python/example/rips_complex_diagram_persistence_from_off_file_example.py b/src/python/example/rips_complex_diagram_persistence_from_off_file_example.py
index 2b335bba..b9074cf9 100755
--- a/src/python/example/rips_complex_diagram_persistence_from_off_file_example.py
+++ b/src/python/example/rips_complex_diagram_persistence_from_off_file_example.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python
-import gudhi
import argparse
+import matplotlib.pyplot as plot
+import gudhi
""" This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
@@ -64,8 +65,8 @@ with open(args.file, "r") as f:
print(simplex_tree.betti_numbers())
if args.no_diagram == False:
- pplot = gudhi.plot_persistence_diagram(diag, band=args.band)
- pplot.show()
+ gudhi.plot_persistence_diagram(diag, band=args.band)
+ plot.show()
else:
print(args.file, "is not a valid OFF file")