TroglodyteDerivations
commited on
Commit
•
b7cc2fd
1
Parent(s):
113f0d4
Removed hashtags in the Object behavior / Method plot_vector_add
Browse files
app.py
CHANGED
@@ -21,8 +21,8 @@ class Vector_Addition:
|
|
21 |
def plot_vector_add(self):
|
22 |
plt.figure(figsize=(10,5))
|
23 |
plt.plot([0, self.v1[0]], [0, self.v1[1]], 'b', label='v1')
|
24 |
-
|
25 |
-
|
26 |
plt.xlabel('X')
|
27 |
plt.ylabel('Y')
|
28 |
plt.title('Vector Addition')
|
|
|
21 |
def plot_vector_add(self):
|
22 |
plt.figure(figsize=(10,5))
|
23 |
plt.plot([0, self.v1[0]], [0, self.v1[1]], 'b', label='v1')
|
24 |
+
plt.plot([0, self.v2[0]+self.v1[0]], [0, self.v2[1]+self.v1[1]], 'r', label='v2')
|
25 |
+
plt.plot([0, self.v1[0]+ self.v2[0]], [0, self.v1[1]+ self.v2[1]], 'k', label='v1+v2')
|
26 |
plt.xlabel('X')
|
27 |
plt.ylabel('Y')
|
28 |
plt.title('Vector Addition')
|