From aab09f133f6e4d17b1b9da02282dc5d36cb56cad Mon Sep 17 00:00:00 2001 From: Lizzzka007 <gashchuk2011@mail.ru> Date: Tue, 20 Jun 2023 14:03:49 +0300 Subject: [PATCH] Hotfix --- plotter/Plotter.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plotter/Plotter.py b/plotter/Plotter.py index 237b349..a01848f 100755 --- a/plotter/Plotter.py +++ b/plotter/Plotter.py @@ -13,6 +13,7 @@ class Plotter: ani_pngs_dir = "plotter_lib_pngs/" def __init__(self): + self.ani_period = float(1/10) self.filename = None self.out = None self.oname = None @@ -162,6 +163,8 @@ class Plotter: else: min_val = self.min_y[0] + duration = self.ani_period * len(names) + for datafile in names: fig = plt.figure() plt.ylim([min_val, max_val]) @@ -184,7 +187,7 @@ class Plotter: for file_name in png_names: images.append(imageio.v2.imread(file_name)) - imageio.mimsave(self.oname[0], images, duration=20, loop = 0) + imageio.mimsave(self.oname[0], images, duration=duration, loop = 0) shutil.rmtree(self.ani_pngs_dir) def __plot_contour(self): @@ -289,6 +292,8 @@ class Plotter: # print(max_val) + duration = self.ani_period * len(self.filename) + i = 0 for var in self.var: if self.title == None: @@ -319,7 +324,7 @@ class Plotter: for file_name in png_names: images.append(imageio.v2.imread(file_name)) - imageio.mimsave(self.out + fig_names[i] + fig_end, images, duration = 5, ) + imageio.mimsave(self.out + fig_names[i] + fig_end, images, duration = duration, loop=0) i += 1 shutil.rmtree(self.ani_pngs_dir) -- GitLab