Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Further improvements to the animation generator for Chambers
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jan 9, 2023
1 parent b546ba6 commit e0498f6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/Chambers2013/aescattermovie.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
import matplotlib.colors as mcolors

titletext = "Chambers (2013)"
animation_file = "Chambers2013-aescatter.mp4"
radscale = 2000
AU = 1.0
xmin = 0.0
xmax = 2.25
ymin = 0.0
ymax = 1.0
framejump = 10
framejump = 1
ncutoff = 1e20

class AnimatedScatter(object):
Expand Down Expand Up @@ -40,8 +41,8 @@ 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'])
print('Finished writing aescattter.mp4')
self.ani.save(animation_file, fps=30, dpi=300, extra_args=['-vcodec', 'libx264'])
print(f'Finished writing {animation_file}')

def scatters(self, pl, radmarker, origin):
scat = []
Expand Down

0 comments on commit e0498f6

Please sign in to comment.