summaryrefslogtreecommitdiff
path: root/src/cython/doc/persistence_graphical_tools_user.rst
blob: 0cb61cf17802de2bc9f6b2a223a8e797eb974986 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
=======================================
Persistence graphical tools user manual
=======================================
Definition
----------
.. include:: persistence_graphical_tools_sum.rst


Show palette values
-------------------

This function is useful to show the color palette values of dimension:


.. testcode::

    import gudhi
    gudhi.show_palette_values(alpha=1.0)

Show persistence as a barcode
-----------------------------

This function can display the persistence result as a barcode:

.. testcode::

    import gudhi
    
    periodic_cc = gudhi.PeriodicCubicalComplex(perseus_file='3d_torus.txt')
    diag = periodic_cc.persistence()
    gudhi.barcode_persistence(diag)


Show persistence as a diagram
-----------------------------

This function can display the persistence result as a diagram:

.. testcode::

    import gudhi
    
    alpha_complex = gudhi.AlphaComplex(off_file='tore3D_300.off')
    alpha_complex.initialize_filtration()
    diag = alpha_complex.persistence()
    gudhi.diagram_persistence(diag)