From e0625408c8504c71ddff2831cf6cd157585074ff Mon Sep 17 00:00:00 2001
From: "armindamon.riess" <armindamon.riess@uzh.ch>
Date: Tue, 13 Dec 2022 20:27:10 +0100
Subject: [PATCH] fixed error

---
 plots/animation.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/plots/animation.py b/plots/animation.py
index 582c80e..cd6690b 100644
--- a/plots/animation.py
+++ b/plots/animation.py
@@ -1,6 +1,6 @@
 import numpy as np
 from matplotlib import pyplot as plt
-from matplotlib.animation import FuncAnimation
+import matplotlib.animation as animation
 
 data = np.loadtxt("../out/positions.dat")
 print(data.shape)
@@ -19,11 +19,13 @@ def animate(i):
     xi = x[i*N:(i+1)*N]
     yi = y[i*N:(i+1)*N]
     plt.cla()
-    plt.scatter(xi, yi, s=1)
+    plt.scatter(xi, yi, s=0.1)
+    plt.xlabel("x")
+    plt.ylabel("y")
+    plt.axis("equal")
     plt.xlim(-1, 1)
     plt.ylim(-1, 1)
-    plt.axis("equal")
 
-animation = FuncAnimation(fig, animate, frames=nSteps)
-mp4writer = animation.FFMpegWriter(fps=30)
-animation.save("animation.mp4", writer=mp4writer)
\ No newline at end of file
+anim = animation.FuncAnimation(fig, animate, frames=nSteps)
+mp4writer = animation.FFMpegWriter(fps=24)
+anim.save("animation.mp4", writer=mp4writer, dpi=100)
\ No newline at end of file
-- 
GitLab