diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-06-06 14:54:17 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-06-06 14:54:17 +0000 |
commit | 4a089fe4840f09b4aabafa06ad53200baa6d6547 (patch) | |
tree | 157100145d7f41c93aed0b275ed6f75c18aeb2fc /src/cython/example/rips_persistence_diagram.py | |
parent | 17a700173e489acd763519f24d7321b1b64ad9b0 (diff) |
bar code persistence tool
Copyright modification
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@1251 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: ff7a8baeffbcafe6d074786b6a7956d815edd21b
Diffstat (limited to 'src/cython/example/rips_persistence_diagram.py')
-rwxr-xr-x | src/cython/example/rips_persistence_diagram.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/cython/example/rips_persistence_diagram.py b/src/cython/example/rips_persistence_diagram.py index 3e95f2cc..57f25b22 100755 --- a/src/cython/example/rips_persistence_diagram.py +++ b/src/cython/example/rips_persistence_diagram.py @@ -1,7 +1,6 @@ #!/usr/bin/env python import gudhi -import matplotlib.pyplot as plt """This file is part of the Gudhi Library. The Gudhi library (Geometric Understanding in Higher Dimensions) is a generic C++ @@ -9,7 +8,7 @@ import matplotlib.pyplot as plt Author(s): Marc Glisse - Copyright (C) 2016 INRIA Saclay (France) + Copyright (C) 2016 INRIA This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +25,7 @@ import matplotlib.pyplot as plt """ __author__ = "Marc Glisse" -__copyright__ = "Copyright (C) 2016 INRIA Saclay (France)" +__copyright__ = "Copyright (C) 2016 INRIA" __license__ = "GPL v3" print("#####################################################################") @@ -37,11 +36,4 @@ rips = gudhi.RipsComplex(points=[[0, 0], [1, 0], [0, 1], [1, 1]], diag = rips.persistence(homology_coeff_field=2, min_persistence=0) print("diag=", diag) -diag0=[i[1] for i in diag if i[0]==0] -diag1=[i[1] for i in diag if i[0]==1] - -plt.plot([i[0] for i in diag0],[min(i[1],1.5) for i in diag0],'ro', - [i[0] for i in diag1],[i[1] for i in diag1],'bs',[-.2,1.5],[-.2,1.5], - '-') -plt.axis([-.2,1.5,-.2,1.5]) -plt.show() +gudhi.bar_code_persistence(diag) |