Skip to content

Commit d25b010

Browse files
committed
Get rid of mpl warnings when creating 3d axes.
1 parent 69b4518 commit d25b010

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: content/tutorial-static_equilibrium.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Quiver plots will be used to demonstrate [three dimensional vectors](https://mat
8282
```{code-cell}
8383
fig = plt.figure()
8484
85-
d3 = fig.gca(projection="3d")
85+
d3 = fig.add_subplot(projection="3d")
8686
8787
d3.set_xlim(-1, 1)
8888
d3.set_ylim(-1, 1)
@@ -113,7 +113,7 @@ You can plot it to see the result.
113113
```{code-cell}
114114
fig = plt.figure()
115115
116-
d3 = fig.gca(projection="3d")
116+
d3 = fig.add_subplot(projection="3d")
117117
118118
d3.set_xlim(-1, 1)
119119
d3.set_ylim(-1, 1)
@@ -165,7 +165,7 @@ d3.set_xlim(-1, 1)
165165
d3.set_ylim(-1, 1)
166166
d3.set_zlim(-1, 1)
167167
168-
d3 = fig.gca(projection="3d")
168+
d3 = fig.add_subplot(projection="3d")
169169
170170
x, y, z = np.array([0, 0, 0])
171171

0 commit comments

Comments
 (0)