Save Plotly graphs in powerpoint and how to add caption in graph

I need help in saving plotly graphs in powerpoint .

My code.

import plotly.graph_objects as go  

fig = go.Figure()       

fig.add_trace(go.Bar(x=["Apple", 'Mango', 'Banana'], y=[4000, 3000, 5000])) 

fig.show()

Hi @maddy6,

You can export your plot to a png image and paste it into your powerpoint.

Note that the interactivity is lost in this format. If you want to keep it you’ll need to export to a standalone HTML file.

See the Plotly docs at:

Alex-

@Alexboiboi I want to directly save the plots to powerpoint.

@maddy6 If I understand you correctly you want to generate a powerpoint file with plots in it? If you want to do that I guess you could use the satic png export from plotly and then embed it using the python-pptx package (https://python-pptx.readthedocs.io/en/latest/)

Alex-

@Alexboiboi I’m new to plotly. Can you help me with one plot embed in powerpoint.
you can use any simple example.

@maddy6, If I understand correctly, you would like to include one or more interactive charts powered by Plotly using the Python API into a Microsoft PowerPoint presentation. I’m afraid this is not going to be an easy task since PowerPoint does not natively allow users to insert and execute Python code. However, you might be able to do something similar by using Plotly.js (JavaScript API) to create a web page that includes just the interactive chart and then embed or link that web page in your presentation (some instructions here).

three reasons why you should buy plotly pro: support open source, get great support, host your plots and dashboards online