Can I save pic which I generate by plotly in memory?

I need to draw a group of pics by plotly in python, then embed them in a .docx file. I have tried to use ‘request.get().content’, but it will traceback, I guess it may be only use to get image online. Now I draw all pics I need, but they will be open in a temp html as soon as they generated. Can I save them in my memory then embed them in a .docx file in my next step programming?

@tracy1371, Yes you can: iplot(fig, filename='myfile', image='png') .

@empet Thank you a lot for replying, I’ve tried and it works. While it sucks to have to open the browser, I wonder that if I could save these images in my local path without opening browser?

@tracy1371 iplot is called from a jupyter notebook and no browser tab is opened when you plot and save the corresponding image. plot opens the browser.