Commit 98969cf1 authored by Zoheyr Doctor's avatar Zoheyr Doctor 🔭
Browse files

added ability to have no names shown in catalog video and generated such a video

parent d59e2678
......@@ -15,6 +15,13 @@ def make_parser():
type=str,
help='json file with median values',
)
parser.add_argument(
"--outfile",
type=str,
help='output file name',
default='orbit.mp4'
)
parser.add_argument(
"--round",
......@@ -27,6 +34,13 @@ def make_parser():
help="use dark background",
action="store_true")
parser.add_argument(
"--no_names",
help="don\'t show event names on top of them",
action="store_true",
default=False
)
return parser
def main():
......@@ -142,9 +156,14 @@ def main():
artist_dict['%s_m1'%event].set_zorder(zorder_1)
artist_dict['%s_m2'%event].set_zorder(zorder_2)
# configure plot axes, title
ax[ei].set_xlim([-1,1])
ax[ei].set_ylim([-1,1])
ax[ei].set_title(event)
print(args.no_names)
if not args.no_names:
print('putting names on events')
ax[ei].set_title(event)
return artist_dict
def animate(i):
......@@ -168,7 +187,7 @@ def main():
anim = animation.FuncAnimation(fig,animate,init_func=init,frames=n_frames)
#anim.save('orbit.gif',fps=fps,writer='imagemagick',extra_args=['-vcodec', 'libx264'])
anim.save('orbit.mp4',fps=fps,extra_args=['-vcodec', 'libx264'])
anim.save(args.outfile,fps=fps,extra_args=['-vcodec', 'libx264'])
if __name__ == '__main__':
main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment