[plotter] allow animated one figure plot

This commit is contained in:
Noe Brucy
2022-02-16 15:36:14 +01:00
parent 981cda51ad
commit 6c18ef5fcd
+4 -3
View File
@@ -402,12 +402,13 @@ class Plotter(Aggregator, BaseProcessor):
onefigure = False # If axes are provided, only save/close once onefigure = False # If axes are provided, only save/close once
if ax is not None: if ax is not None:
onefigure = True onefigure = True
plot_filename = self._find_filename(name_full) if not movie:
plot_filename = self._find_filename(name_full)
for i, (run, num) in enumerate(run_num): for i, (run, num) in enumerate(run_num):
# Find filename # Find filename
if not onefigure: if not onefigure or movie:
plot_filename = self._find_filename(name_full, run, num) plot_filename = self._find_filename(name_full, run, num)
# Find ax # Find ax
@@ -514,7 +515,7 @@ class Plotter(Aggregator, BaseProcessor):
tag_name = "_" + tag_name tag_name = "_" + tag_name
if run is not None and num is not None: if run is not None and num is not None:
fmt = "{out}/{run}{subfolder}/{name}{tag}_{run}_{num:05}{ext}" fmt = "{out}/{run}{subfolder}/{name}{tag}_{run}{ext}"
elif run is not None: elif run is not None:
fmt = "{out}/{run}{subfolder}/{name}{tag}_{run}{ext}" fmt = "{out}/{run}{subfolder}/{name}{tag}_{run}{ext}"
else: else: