From 1e4d200188d8011016efd7327b61028bc1029a11 Mon Sep 17 00:00:00 2001 From: George Bisbas Date: Fri, 24 Mar 2023 17:57:04 +0000 Subject: [PATCH] examples: refresh plotting due to gca(projection="3d") deprecation --- examples/cfd/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cfd/tools.py b/examples/cfd/tools.py index ac0e0ba994..44766a049a 100644 --- a/examples/cfd/tools.py +++ b/examples/cfd/tools.py @@ -35,7 +35,7 @@ def plot_field(field, xmin=0., xmax=2., ymin=0., ymax=2., zmin=None, zmax=None, x_coord = np.linspace(xmin, xmax, field.shape[0]) y_coord = np.linspace(ymin, ymax, field.shape[1]) fig = pyplot.figure(figsize=(11, 7), dpi=100) - ax = fig.gca(projection='3d') + ax = fig.add_subplot(111, projection='3d') X, Y = np.meshgrid(x_coord, y_coord, indexing='ij') ax.plot_surface(X, Y, field[:], cmap=cm.viridis, rstride=1, cstride=1, linewidth=linewidth, antialiased=False)