I stumbled upon a need where I need to save an interactive figure which is plotted in Python by using plotly.
After hours of googling and whatnot, I found 2 solutions given in the plotly documentation to save a figure: 1. Static Image Export 2. Interactive HTML Export in Python
Interactive HTML Export fulfilled my need but left me wondering can't I use other interactive image formats i.e gif etc.
Please use the below code to find ways of saving this figure other than .html.
df = px.data.gapminder()
fig = px.scatter_geo(df, locations="iso_alpha", color="continent",
hover_name="country", size="pop",
animation_frame="year",
projection="natural earth")
fig.show() # Used for showing output in jupyter notebook
fig.write_html('output.html') # actually used for exporting as an .html file
Thank you in advance.