summaryrefslogtreecommitdiff
path: root/src/cython/doc/persistence_graphical_tools_user.rst
diff options
context:
space:
mode:
Diffstat (limited to 'src/cython/doc/persistence_graphical_tools_user.rst')
-rw-r--r--src/cython/doc/persistence_graphical_tools_user.rst25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/cython/doc/persistence_graphical_tools_user.rst b/src/cython/doc/persistence_graphical_tools_user.rst
index 43c695bf..1a5195c5 100644
--- a/src/cython/doc/persistence_graphical_tools_user.rst
+++ b/src/cython/doc/persistence_graphical_tools_user.rst
@@ -17,6 +17,11 @@ This function is useful to show the color palette values of dimension:
import gudhi
gudhi.show_palette_values(alpha=1.0)
+.. plot::
+
+ import gudhi
+ gudhi.show_palette_values(alpha=1.0)
+
Show persistence as a barcode
-----------------------------
@@ -30,6 +35,13 @@ This function can display the persistence result as a barcode:
diag = periodic_cc.persistence()
gudhi.barcode_persistence(diag)
+.. plot::
+
+ import gudhi
+
+ periodic_cc = gudhi.PeriodicCubicalComplex(perseus_file='3d_torus.txt')
+ diag = periodic_cc.persistence()
+ gudhi.barcode_persistence(diag)
Show persistence as a diagram
-----------------------------
@@ -40,7 +52,16 @@ This function can display the persistence result as a diagram:
import gudhi
- alpha_complex = gudhi.AlphaComplex(off_file='tore3D_300.off')
- simplex_tree = alpha_complex.create_simplex_tree()
+ rips_complex = gudhi.RipsComplex(off_file='tore3D_300.off', max_edge_length=2.0)
+ simplex_tree = rips_complex.create_simplex_tree(max_dimension=3)
+ diag = simplex_tree.persistence()
+ gudhi.diagram_persistence(diag)
+
+.. plot::
+
+ import gudhi
+
+ rips_complex = gudhi.RipsComplex(off_file='tore3D_300.off', max_edge_length=2.0)
+ simplex_tree = rips_complex.create_simplex_tree(max_dimension=3)
diag = simplex_tree.persistence()
gudhi.diagram_persistence(diag)