Skip to content

Commit 6db128b

Browse files
author
Daniel Precioso, PhD
committed
Fix indexing in particle heading plots for Vicsek model validation
1 parent 1a17573 commit 6db128b

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

modules/collective-motion/vicsek-validation.qmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ for t in range(10):
3737
# Plot the headings of the particles
3838
plt.figure(figsize=(6, 6))
3939
plt.quiver(
40-
xy[:, 0],
41-
xy[:, 1],
40+
xy[0],
41+
xy[1],
4242
np.cos(theta),
4343
np.sin(theta),
4444
angles='xy',
@@ -98,8 +98,8 @@ for t in range(10):
9898
# Plot the headings of the particles
9999
plt.figure(figsize=(6, 6))
100100
plt.quiver(
101-
xy[:, 0],
102-
xy[:, 1],
101+
xy[0],
102+
xy[1],
103103
np.cos(theta),
104104
np.sin(theta),
105105
angles='xy',
@@ -158,8 +158,8 @@ for t in range(10):
158158
# Plot the headings of the particles
159159
plt.figure(figsize=(6, 6))
160160
plt.quiver(
161-
xy[:, 0],
162-
xy[:, 1],
161+
xy[0],
162+
xy[1],
163163
np.cos(theta),
164164
np.sin(theta),
165165
angles='xy',
@@ -218,8 +218,8 @@ for t in range(10):
218218
# Plot the headings of the particles
219219
plt.figure(figsize=(6, 6))
220220
plt.quiver(
221-
xy[:, 0],
222-
xy[:, 1],
221+
xy[0],
222+
xy[1],
223223
np.cos(theta),
224224
np.sin(theta),
225225
angles='xy',

0 commit comments

Comments
 (0)