Skip to content

Commit

Permalink
examples: refresh plotting due to gca(projection="3d") deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Feb 21, 2023
1 parent 657857a commit d071183
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/cfd/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d071183

Please sign in to comment.