summaryrefslogtreecommitdiff
path: root/src/python/doc/persistence_graphical_tools_user.rst
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/doc/persistence_graphical_tools_user.rst')
-rw-r--r--src/python/doc/persistence_graphical_tools_user.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/python/doc/persistence_graphical_tools_user.rst b/src/python/doc/persistence_graphical_tools_user.rst
index ff51604e..91e52703 100644
--- a/src/python/doc/persistence_graphical_tools_user.rst
+++ b/src/python/doc/persistence_graphical_tools_user.rst
@@ -57,6 +57,18 @@ This function can display the persistence result as a diagram:
ax.set_aspect("equal") # forces to be square shaped
plt.show()
+Note that (as barcode and density) it can also take a simple `np.array`
+of shape (N x 2) encoding a persistence diagram (in a given dimension).
+
+.. plot::
+ :include-source:
+
+ import matplotlib.pyplot as plt
+ import gudhi
+ import numpy as np
+ d = np.array([[0, 1], [1, 2], [1, np.inf]])
+ gudhi.plot_persistence_diagram(d)
+ plt.show()
Persistence density
-------------------