diff options
author | wreise <wojciech.reise@epfl.ch> | 2022-10-19 10:31:32 +0200 |
---|---|---|
committer | wreise <wojciech.reise@epfl.ch> | 2022-10-19 10:31:32 +0200 |
commit | 04b7f0315502b7650c8ad6df3dc9d4d1a1a5316e (patch) | |
tree | 868b1a39c63ff72df4a5e7e45ea08826401fb936 /src/python | |
parent | cd7dea8627f4b1c624e88d5ff28b32d1602f5e39 (diff) | |
parent | c1e7f2dad8ee6c4e8604edcef5f98e21674fd464 (diff) |
Merge branch 'master' into optimize_silhouettes
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/doc/installation.rst | 2 | ||||
-rw-r--r-- | src/python/gudhi/persistence_graphical_tools.py | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/python/doc/installation.rst b/src/python/doc/installation.rst index 4eefd415..b704f778 100644 --- a/src/python/doc/installation.rst +++ b/src/python/doc/installation.rst @@ -39,7 +39,7 @@ If you are instead using a git checkout, beware that the paths are a bit different, and in particular the `python/` subdirectory is actually `src/python/` there. -The library uses c++14 and requires `Boost <https://www.boost.org/>`_ :math:`\geq` 1.66.0, +The library uses c++17 and requires `Boost <https://www.boost.org/>`_ :math:`\geq` 1.66.0, `CMake <https://www.cmake.org/>`_ :math:`\geq` 3.5 to generate makefiles, Python :math:`\geq` 3.5, `NumPy <http://numpy.org>`_ :math:`\geq` 1.15.0, `Cython <https://www.cython.org/>`_ :math:`\geq` 0.27 and `pybind11 <https://github.com/pybind/pybind11>`_ to compile the GUDHI Python module. diff --git a/src/python/gudhi/persistence_graphical_tools.py b/src/python/gudhi/persistence_graphical_tools.py index 21275cdd..e438aa66 100644 --- a/src/python/gudhi/persistence_graphical_tools.py +++ b/src/python/gudhi/persistence_graphical_tools.py @@ -194,19 +194,21 @@ def plot_persistence_barcode( y=[(death - birth) if death != float("inf") else (infinity - birth) for (dim,(birth,death)) in persistence] c=[colormap[dim] for (dim,(birth,death)) in persistence] - axes.barh(list(reversed(range(len(x)))), y, height=0.8, left=x, alpha=alpha, color=c, linewidth=0) + axes.barh(range(len(x)), y, left=x, alpha=alpha, color=c, linewidth=0) if legend: - dimensions = list(set(item[0] for item in persistence)) + dimensions = set(item[0] for item in persistence) axes.legend( handles=[mpatches.Patch(color=colormap[dim], label=str(dim)) for dim in dimensions], loc="lower right", ) axes.set_title("Persistence barcode", fontsize=fontsize) + axes.set_yticks([]) + axes.invert_yaxis() # Ends plot on infinity value and starts a little bit before min_birth if len(x) != 0: - axes.axis([axis_start, infinity, 0, len(x)]) + axes.set_xlim((axis_start, infinity)) return axes except ImportError as import_error: |