How to export/save an animated bubble chart made with plotly?

别来无恙 提交于 2020-12-06 03:51:29

问题


How to export/save an animated bubble chart made with plotly? (For instance, the one was made following the link below) I would like to have it in a gift or some format with better resolution. Thank you in advance.

https://www.kaggle.com/aashita/guide-to-animated-bubble-charts-using-plotly


回答1:


There is no possibility to do this in plotly. Please use givemaker and save every step in the animation as a single picture to later combine them to a gif. Follow this source. Further explanation on how to create animations is provided by plotly here.

The basic way to go would be to integrate this logic into the animation process of your plotly code:

 import ImageSequence
 import Image
 import gifmaker
 sequence = []

 im = Image.open(....)

 # im is your original image
 frames = [frame.copy() for frame in ImageSequence.Iterator(im)]

 # write GIF animation
 fp = open("out.gif", "wb")
 gifmaker.makedelta(fp, frames)
 fp.close()

If you could provide your actual code, it would be possible to provide a more detailled answer to your question. :)



来源:https://stackoverflow.com/questions/55460434/how-to-export-save-an-animated-bubble-chart-made-with-plotly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!