summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-06-15 18:03:45 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-06-15 18:03:45 +0200
commit8587b70b268aaf7be2ab5b0e163d43f5587b0aac (patch)
treefe1f50e02e2f14cb769190883e3fdc55c6f97e77 /src/python
parent17da2842a3af3db3abec7c2ce03f77dad47ef5dc (diff)
Fix MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C as it is deprecated since 3.3
Diffstat (limited to 'src/python')
-rw-r--r--src/python/gudhi/persistence_graphical_tools.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/python/gudhi/persistence_graphical_tools.py b/src/python/gudhi/persistence_graphical_tools.py
index 460e2558..460029fb 100644
--- a/src/python/gudhi/persistence_graphical_tools.py
+++ b/src/python/gudhi/persistence_graphical_tools.py
@@ -502,7 +502,7 @@ def plot_persistence_density(
zi = k(np.vstack([xi.flatten(), yi.flatten()]))
# Make the plot
- img = axes.pcolormesh(xi, yi, zi.reshape(xi.shape), cmap=cmap)
+ img = axes.pcolormesh(xi, yi, zi.reshape(xi.shape), cmap=cmap, shading='auto')
if greyblock:
axes.add_patch(mpatches.Polygon([[birth.min(), birth.min()], [death.max(), birth.min()], [death.max(), death.max()]], fill=True, color='lightgrey'))