summaryrefslogtreecommitdiff
path: root/src/cython/doc
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-08-09 10:44:44 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-08-09 10:44:44 +0000
commit947d6f3b5bf90689e0d1ba6a4d566bab0730b5a9 (patch)
tree3e37ed2dc5acd8d42b6a15bf4aba8cfe9bfeaae8 /src/cython/doc
parent295d60787357806ae9aac1bfab98f3fefcd759a0 (diff)
parent1129608c2add6f15538b3e281d75119f0e1bc8b0 (diff)
Merge last trunk modifications
persistence file reader Python interface persistence_graphical_tools improvement (max_plots and max_barcodes, and from a persistence file) git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_diagram_improvement@2604 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: db80333d4f34151be0c32024af597d90d221a97f
Diffstat (limited to 'src/cython/doc')
-rw-r--r--src/cython/doc/persistence_graphical_tools_user.rst20
-rwxr-xr-xsrc/cython/doc/pyplots/barcode_persistence.py3
-rwxr-xr-xsrc/cython/doc/pyplots/diagram_persistence.py4
-rwxr-xr-xsrc/cython/doc/pyplots/show_palette_values.py3
4 files changed, 18 insertions, 12 deletions
diff --git a/src/cython/doc/persistence_graphical_tools_user.rst b/src/cython/doc/persistence_graphical_tools_user.rst
index bc731f12..13198162 100644
--- a/src/cython/doc/persistence_graphical_tools_user.rst
+++ b/src/cython/doc/persistence_graphical_tools_user.rst
@@ -14,12 +14,14 @@ This function is useful to show the color palette values of dimension:
.. testcode::
import gudhi
- gudhi.show_palette_values(alpha=1.0)
+ plt = gudhi.show_palette_values(alpha=1.0)
+ plt.show()
.. plot::
import gudhi
- gudhi.show_palette_values(alpha=1.0)
+ plt = gudhi.show_palette_values(alpha=1.0)
+ plt.show()
Show persistence as a barcode
-----------------------------
@@ -32,7 +34,8 @@ This function can display the persistence result as a barcode:
periodic_cc = gudhi.PeriodicCubicalComplex(perseus_file='3d_torus.txt')
diag = periodic_cc.persistence()
- gudhi.plot_persistence_barcode(diag)
+ plt = gudhi.plot_persistence_barcode(diag)
+ plt.show()
.. plot::
@@ -40,7 +43,8 @@ This function can display the persistence result as a barcode:
periodic_cc = gudhi.PeriodicCubicalComplex(perseus_file='3d_torus.txt')
diag = periodic_cc.persistence()
- gudhi.plot_persistence_barcode(diag)
+ plt = gudhi.plot_persistence_barcode(diag)
+ plt.show()
Show persistence as a diagram
-----------------------------
@@ -54,8 +58,8 @@ This function can display the persistence result as a diagram:
rips_complex = gudhi.RipsComplex(off_file='tore3D_1307.off', max_edge_length=0.2)
simplex_tree = rips_complex.create_simplex_tree(max_dimension=3)
diag = simplex_tree.persistence()
- pplot = gudhi.plot_persistence_diagram(diag, band_boot=0.13)
- pplot.show()
+ plt = gudhi.plot_persistence_diagram(diag, band_boot=0.13)
+ plt.show()
.. plot::
@@ -64,5 +68,5 @@ This function can display the persistence result as a diagram:
rips_complex = gudhi.RipsComplex(off_file='tore3D_1307.off', max_edge_length=0.2)
simplex_tree = rips_complex.create_simplex_tree(max_dimension=3)
diag = simplex_tree.persistence()
- pplot = gudhi.plot_persistence_diagram(diag, band_boot=0.13)
- pplot.show()
+ plt = gudhi.plot_persistence_diagram(diag, band_boot=0.13)
+ plt.show()
diff --git a/src/cython/doc/pyplots/barcode_persistence.py b/src/cython/doc/pyplots/barcode_persistence.py
index b021049f..9cd3149d 100755
--- a/src/cython/doc/pyplots/barcode_persistence.py
+++ b/src/cython/doc/pyplots/barcode_persistence.py
@@ -2,4 +2,5 @@ import gudhi
periodic_cc = gudhi.PeriodicCubicalComplex(perseus_file='3d_torus.txt')
diag = periodic_cc.persistence()
-gudhi.plot_persistence_barcode(diag)
+plt = gudhi.plot_persistence_barcode(diag)
+plt.show()
diff --git a/src/cython/doc/pyplots/diagram_persistence.py b/src/cython/doc/pyplots/diagram_persistence.py
index 56d6c50f..30661965 100755
--- a/src/cython/doc/pyplots/diagram_persistence.py
+++ b/src/cython/doc/pyplots/diagram_persistence.py
@@ -3,5 +3,5 @@ import gudhi
rips_complex = gudhi.RipsComplex(off_file='tore3D_1307.off', max_edge_length=0.2)
simplex_tree = rips_complex.create_simplex_tree(max_dimension=3)
diag = simplex_tree.persistence()
-pplot = gudhi.plot_persistence_diagram(diag, band_boot=0.13)
-pplot.show()
+plt = gudhi.plot_persistence_diagram(diag, band_boot=0.13)
+plt.show()
diff --git a/src/cython/doc/pyplots/show_palette_values.py b/src/cython/doc/pyplots/show_palette_values.py
index e72a55fd..fdf9645f 100755
--- a/src/cython/doc/pyplots/show_palette_values.py
+++ b/src/cython/doc/pyplots/show_palette_values.py
@@ -1,2 +1,3 @@
import gudhi
-gudhi.show_palette_values(alpha=1.0)
+plt = gudhi.show_palette_values(alpha=1.0)
+plt.show()