From 0825600170a03b11123e36dce9ba95da45e36306 Mon Sep 17 00:00:00 2001 From: David Minton Date: Tue, 24 Aug 2021 13:56:30 -0400 Subject: [PATCH 1/2] Changed encoding options for animation scripts to one that work on the RCAC cluster --- examples/symba_chambers_2013/aescattermovie.py | 4 ++-- examples/symba_clement_2018/aescattermovie.py | 4 ++-- examples/symba_mars_disk/aescattermovie.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/symba_chambers_2013/aescattermovie.py b/examples/symba_chambers_2013/aescattermovie.py index ed1dc4bdc..859aae87d 100755 --- a/examples/symba_chambers_2013/aescattermovie.py +++ b/examples/symba_chambers_2013/aescattermovie.py @@ -39,7 +39,7 @@ def __init__(self, ds, param): self.ax.set_ylim(ymin, ymax) fig.add_axes(self.ax) self.ani = animation.FuncAnimation(fig, self.update, interval=1, frames=nframes, init_func=self.setup_plot, blit=True) - self.ani.save('aescatter.mp4', fps=30, dpi=300, extra_args=['-vcodec', 'libx264']) + self.ani.save('aescatter.mp4', fps=30, dpi=300, extra_args=['-vcodec', 'mpeg4']) print('Finished writing aescattter.mp4') def scatters(self, pl, radmarker, origin): @@ -70,7 +70,7 @@ def setup_plot(self): self.s1 = slist[1] self.s2 = slist[2] self.s3 = slist[3] - self.ax.legend(loc='upper right') + self.ax.legend(loc='lower right') return self.s0, self.s1, self.s2, self.s3, self.title def data_stream(self, frame=0): diff --git a/examples/symba_clement_2018/aescattermovie.py b/examples/symba_clement_2018/aescattermovie.py index b0d5eef0e..45acd2ae1 100755 --- a/examples/symba_clement_2018/aescattermovie.py +++ b/examples/symba_clement_2018/aescattermovie.py @@ -39,7 +39,7 @@ def __init__(self, ds, param): self.ax.set_ylim(ymin, ymax) fig.add_axes(self.ax) self.ani = animation.FuncAnimation(fig, self.update, interval=1, frames=nframes, init_func=self.setup_plot, blit=True) - self.ani.save('aescatter.mp4', fps=30, dpi=300, extra_args=['-vcodec', 'libx264']) + self.ani.save('aescatter.mp4', fps=30, dpi=300, extra_args=['-vcodec', 'mpeg4']) print('Finished writing aescattter.mp4') def scatters(self, pl, radmarker, origin): @@ -70,7 +70,7 @@ def setup_plot(self): self.s1 = slist[1] self.s2 = slist[2] self.s3 = slist[3] - self.ax.legend(loc='upper right') + self.ax.legend(loc='lower right') return self.s0, self.s1, self.s2, self.s3, self.title def data_stream(self, frame=0): diff --git a/examples/symba_mars_disk/aescattermovie.py b/examples/symba_mars_disk/aescattermovie.py index 46fec5f09..a1f994681 100755 --- a/examples/symba_mars_disk/aescattermovie.py +++ b/examples/symba_mars_disk/aescattermovie.py @@ -39,7 +39,7 @@ def __init__(self, ds, param): self.ax.set_ylim(ymin, ymax) fig.add_axes(self.ax) self.ani = animation.FuncAnimation(fig, self.update, interval=1, frames=nframes, init_func=self.setup_plot, blit=True) - self.ani.save('aescatter.mp4', fps=30, dpi=300, extra_args=['-vcodec', 'libx264']) + self.ani.save('aescatter.mp4', fps=30, dpi=300, extra_args=['-vcodec', 'mpeg4']) print('Finished writing aescattter.mp4') def scatters(self, pl, radmarker, origin): From a2f07cbbe3a7f28c03c05055672eadb995c4db5e Mon Sep 17 00:00:00 2001 From: David Minton Date: Tue, 24 Aug 2021 14:17:31 -0400 Subject: [PATCH 2/2] Set blit=False in animation scripts to prevent elements from persisting between frames --- examples/symba_chambers_2013/aescattermovie.py | 2 +- examples/symba_clement_2018/aescattermovie.py | 2 +- examples/symba_mars_disk/aescattermovie.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/symba_chambers_2013/aescattermovie.py b/examples/symba_chambers_2013/aescattermovie.py index 859aae87d..858327cb1 100755 --- a/examples/symba_chambers_2013/aescattermovie.py +++ b/examples/symba_chambers_2013/aescattermovie.py @@ -38,7 +38,7 @@ def __init__(self, ds, param): self.ax.set_xlim(xmin, xmax) self.ax.set_ylim(ymin, ymax) fig.add_axes(self.ax) - self.ani = animation.FuncAnimation(fig, self.update, interval=1, frames=nframes, init_func=self.setup_plot, blit=True) + self.ani = animation.FuncAnimation(fig, self.update, interval=1, frames=nframes, init_func=self.setup_plot, blit=False) self.ani.save('aescatter.mp4', fps=30, dpi=300, extra_args=['-vcodec', 'mpeg4']) print('Finished writing aescattter.mp4') diff --git a/examples/symba_clement_2018/aescattermovie.py b/examples/symba_clement_2018/aescattermovie.py index 45acd2ae1..67db91503 100755 --- a/examples/symba_clement_2018/aescattermovie.py +++ b/examples/symba_clement_2018/aescattermovie.py @@ -38,7 +38,7 @@ def __init__(self, ds, param): self.ax.set_xlim(xmin, xmax) self.ax.set_ylim(ymin, ymax) fig.add_axes(self.ax) - self.ani = animation.FuncAnimation(fig, self.update, interval=1, frames=nframes, init_func=self.setup_plot, blit=True) + self.ani = animation.FuncAnimation(fig, self.update, interval=1, frames=nframes, init_func=self.setup_plot, blit=False) self.ani.save('aescatter.mp4', fps=30, dpi=300, extra_args=['-vcodec', 'mpeg4']) print('Finished writing aescattter.mp4') diff --git a/examples/symba_mars_disk/aescattermovie.py b/examples/symba_mars_disk/aescattermovie.py index a1f994681..f8e29dc9a 100755 --- a/examples/symba_mars_disk/aescattermovie.py +++ b/examples/symba_mars_disk/aescattermovie.py @@ -38,7 +38,7 @@ def __init__(self, ds, param): self.ax.set_xlim(xmin, xmax) self.ax.set_ylim(ymin, ymax) fig.add_axes(self.ax) - self.ani = animation.FuncAnimation(fig, self.update, interval=1, frames=nframes, init_func=self.setup_plot, blit=True) + self.ani = animation.FuncAnimation(fig, self.update, interval=1, frames=nframes, init_func=self.setup_plot, blit=False) self.ani.save('aescatter.mp4', fps=30, dpi=300, extra_args=['-vcodec', 'mpeg4']) print('Finished writing aescattter.mp4')