TroglodyteDerivations commited on
Commit
a679715
1 Parent(s): fdecb76

Modified plot_vector_add

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -21,7 +21,7 @@ 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
- plt.plot([0, self.v2[0]], [0, self.v2[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')
 
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')