summaryrefslogtreecommitdiff
path: root/trunk/src/cython/doc/pyplots/diagram_persistence.py
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/cython/doc/pyplots/diagram_persistence.py')
-rwxr-xr-xtrunk/src/cython/doc/pyplots/diagram_persistence.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/trunk/src/cython/doc/pyplots/diagram_persistence.py b/trunk/src/cython/doc/pyplots/diagram_persistence.py
new file mode 100755
index 00000000..c2fbf801
--- /dev/null
+++ b/trunk/src/cython/doc/pyplots/diagram_persistence.py
@@ -0,0 +1,8 @@
+import gudhi
+
+rips_complex = gudhi.RipsComplex(off_file=gudhi.__root_source_dir__ + \
+ '/data/points/tore3D_1307.off', max_edge_length=0.2)
+simplex_tree = rips_complex.create_simplex_tree(max_dimension=3)
+diag = simplex_tree.persistence()
+plt = gudhi.plot_persistence_diagram(diag, band_boot=0.13)
+plt.show()