From fbb3cb615179ca068955a7a3567728f954f21baa Mon Sep 17 00:00:00 2001
From: Florent Jaillet <florent.jaillet@lis-lab.fr>
Date: Thu, 15 Mar 2018 11:36:07 +0100
Subject: [PATCH] Solving a MatplotlibDeprecationWarning with matplotlib 2.2

---
 ltfatpy/gabor/tfplot.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ltfatpy/gabor/tfplot.py b/ltfatpy/gabor/tfplot.py
index 81a7588..04093f2 100644
--- a/ltfatpy/gabor/tfplot.py
+++ b/ltfatpy/gabor/tfplot.py
@@ -245,7 +245,8 @@ def tfplot(coef, step, yr, fs=None, dynrange=None, normalization='db',
             # plot_surface
             from mpl_toolkits.mplot3d import Axes3D
 
-            ax = plt.gca(projection='3d')
+            plt.delaxes()
+            ax = plt.gcf().add_subplot(111, projection='3d')
             ax.azim = -130.
             ax.elev = 30.
             xgrid, ygrid = np.meshgrid(xr, yr)
-- 
GitLab