From a5bb41408bb27bea7d9785c06a3718cb5fdf367b Mon Sep 17 00:00:00 2001
From: "armindamon.riess" <armindamon.riess@uzh.ch>
Date: Tue, 13 Dec 2022 15:39:39 +0100
Subject: [PATCH] configuring animation script for euler

---
 plots/animation.py | 5 +++--
 run.sh             | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/plots/animation.py b/plots/animation.py
index 95f6264..582c80e 100644
--- a/plots/animation.py
+++ b/plots/animation.py
@@ -22,7 +22,8 @@ def animate(i):
     plt.scatter(xi, yi, s=1)
     plt.xlim(-1, 1)
     plt.ylim(-1, 1)
+    plt.axis("equal")
 
 animation = FuncAnimation(fig, animate, frames=nSteps)
-animation.save("animation.mp4", writer="ffmpeg")
-plt.show()
\ No newline at end of file
+mp4writer = animation.FFMpegWriter(fps=30)
+animation.save("animation.mp4", writer=mp4writer)
\ No newline at end of file
diff --git a/run.sh b/run.sh
index 34de9f4..c9898f6 100644
--- a/run.sh
+++ b/run.sh
@@ -13,4 +13,6 @@ export OMP_NUM_THREADS=48
 cd build/
 make
 ./nbody
+cd ../plots/
+python3 animation.py
 cd ..
-- 
GitLab