Skip to content

Commit 2f42627

Browse files
committed
MAINT: Update statics tutorial plt patterns.
1 parent b92c9f3 commit 2f42627

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

content/tutorial-static_equilibrium.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ d3.quiver(x, y, z, u, v, w, color="r", label="forceA")
9797
u, v, w = forceB
9898
d3.quiver(x, y, z, u, v, w, color="b", label="forceB")
9999
100-
plt.legend()
101-
plt.show()
100+
d3.legend()
102101
```
103102

104103
There are two forces emanating from a single point. In order to simplify this problem, you can add them together to find the sum of forces. Note that both `forceA` and `forceB` are three-dimensional vectors, represented by NumPy as arrays with three components. Because NumPy is meant to simplify and optimize operations between vectors, you can easily compute the sum of these two vectors as follows:
@@ -129,8 +128,7 @@ d3.quiver(x, y, z, u, v, w, color="b", label="forceB")
129128
u, v, w = forceC
130129
d3.quiver(x, y, z, u, v, w, color="g", label="forceC")
131130
132-
plt.legend()
133-
plt.show()
131+
d3.legend()
134132
```
135133

136134
However, the goal is equilibrium.
@@ -172,8 +170,6 @@ x, y, z = np.array([0, 0, 0])
172170
173171
u, v, w = forceA + forceB + R # add them all together for sum of forces
174172
d3.quiver(x, y, z, u, v, w)
175-
176-
plt.show()
177173
```
178174

179175
The empty graph signifies that there are no outlying forces. This denotes a system in equilibrium.

0 commit comments

Comments
 (0)