visualize.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:githubgraph 作者: 0x0FFF 项目源码 文件源码
def writevideo(self):
        #print animation.writers.list()
        #matplotlib.rcParams['animation.ffmpeg_args'] = ['-report', '/tmp/ffmpeg.log']
        #FFMpegWriter = animation.writers['ffmpeg']
        metadata = dict(title='Github Data Projects', artist='0x0FFF',
                        comment='Evolution of open source data projects')
        writer = FFMpegWriter(fps=30,
                              bitrate=8000,
                              metadata=metadata
                             )
        i = 0
        #self.iters = 200
        with writer.saving(self.fig, "/projects/personal/writer_test.mp4", 120):
            while i < self.iters:
                self.update_animation(i)
                writer.grab_frame()
                i += 1
        return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号