# Problem saving images from plotly?

**URL:** <https://community.plotly.com/t/problem-saving-images-from-plotly/36973>\
**Category:** 📊 Plotly Python\
**Created:** [March 31, 2020, 3:33am UTC](https://community.plotly.com/t/problem-saving-images-from-plotly/36973 "2020-03-31T03:33:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomcd](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@tomcd](https://community.plotly.com/u/tomcd)\
**Post date:** [March 31, 2020, 3:33am UTC](https://community.plotly.com/t/problem-saving-images-from-plotly/36973/1 "2020-03-31T03:33:11Z")

</div>

Hi, I am using plotly in an ipython notebook (chrome on osx Mojave) and the plots appear fine on the notebook and look like this:

 ![Screen Shot 2020-03-31 at 2.29.18 pm](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/6/6e65db41e5fad63f5512d42372864da532251659.png)  
When I click on the “Download plot as a png” button or use fig.write\_image or plotly.offline.iplot I get images that look like this:  
 ![fig1d](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/0/07986f5cd48635c96b30efb3605a90ce8297cbc4.png)  
I have tried Jupyter labs and safari to see if it was a notebook or browser issue but the images all come out broken.  
Any help would be greatly appreciated!

Cheers,

Tom

---

<div class="post-metadata">

**Author:** ![Emmanuelle](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emmanuelle/32/7853_2.png) [@Emmanuelle](https://community.plotly.com/u/Emmanuelle)\
**Post date:** [April 1, 2020, 9:00am UTC](https://community.plotly.com/t/problem-saving-images-from-plotly/36973/2 "2020-04-01T09:00:41Z")

</div>

Hi @tomcd, welcome to the forum and thank you for the bug report. Could you please share here a minimal standalone example (possibly using dummy data) so that we can reproduce the problem? Also, please tell us which version of plotly.py and jupyter you are using. Thanks!

---

<div class="post-metadata">

**Author:** ![tomcd](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@tomcd](https://community.plotly.com/u/tomcd)\
**Post date:** [April 1, 2020, 11:06pm UTC](https://community.plotly.com/t/problem-saving-images-from-plotly/36973/3 "2020-04-01T23:06:38Z")

</div>

Hi Emmanuelle,

I attached a csv of input data.

The example from the ipython notebook is:

########START###########

import plotly

fig = px.scatter\_3d(df, y=‘xpos\_dmm’, x=‘ypos’, z=‘H\_Power’,color=‘H\_Power’,  
title = ‘MX3 DMM Heat Load Calculation’,  
opacity=0.9,color\_continuous\_scale=px.colors.sequential.Rainbow)  
fig.update\_layout(margin=dict(l=0, r=0, b=0, t=0), scene = dict(  
#title = dict(  
# title=‘MX3 DMM Heat Load Calculation’),  
xaxis = dict(  
title=‘X position (mm)’),  
yaxis = dict(  
title=‘Y position (mm)’),  
zaxis = dict(  
title=‘Power (W/mm^2)’),),)

fig.show()

########END########

I am using Jupyter core 4.6.3, Notebook 5.7.4 and plotly 4.5.2.

Thanks for your help!

Tom

---

<div class="post-metadata">

**Author:** ![tomcd](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@tomcd](https://community.plotly.com/u/tomcd)\
**Post date:** [April 1, 2020, 11:07pm UTC](https://community.plotly.com/t/problem-saving-images-from-plotly/36973/4 "2020-04-01T23:07:29Z")

</div>

Hi Emmanuelle,

I attached the .csv of raw data.

Cheers,

Tom

(Attachment mask\_heat\_calculations\_plotly.csv is missing)

---

<div class="post-metadata">

**Author:** ![Emmanuelle](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emmanuelle/32/7853_2.png) [@Emmanuelle](https://community.plotly.com/u/Emmanuelle)\
**Post date:** [April 2, 2020, 9:35am UTC](https://community.plotly.com/t/problem-saving-images-from-plotly/36973/5 "2020-04-02T09:35:05Z")

</div>

Hi @tomcd I cannot see the uploaded data could you please upload the file on Github or Google docs for example?

---

<div class="post-metadata">

**Author:** ![tomcd](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@tomcd](https://community.plotly.com/u/tomcd)\
**Post date:** [April 2, 2020, 10:27am UTC](https://community.plotly.com/t/problem-saving-images-from-plotly/36973/6 "2020-04-02T10:27:09Z")

</div>

Hi Emmanuelle,

I have uploaded it on google driver here:

[https://drive.google.com/open?id=1zEPx6M22r0h4m\_TwjDqfDkhqCc9bkN-e](https://drive.google.com/open?id=1zEPx6M22r0h4m_TwjDqfDkhqCc9bkN-e)

Cheers,

Tom

---

<div class="post-metadata">

**Author:** ![Emmanuelle](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emmanuelle/32/7853_2.png) [@Emmanuelle](https://community.plotly.com/u/Emmanuelle)\
**Post date:** [April 2, 2020, 4:44pm UTC](https://community.plotly.com/t/problem-saving-images-from-plotly/36973/7 "2020-04-02T16:44:39Z")

</div>

Hi Tom, I executed your code but the resulting figure does not look like the one you posted above probably it was not created with `px.scatter3d`?

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/e/ed50f5309a768e7d78ec084a24d05f63185b3c30.png)  
Also the image created from the “download as png” button looks the same (plotly 4.6 here, but your version of plotly is recent enough). Also tested with firefox, I will try with Chrome as well.

---

<div class="post-metadata">

**Author:** ![tomcd](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@tomcd](https://community.plotly.com/u/tomcd)\
**Post date:** [April 2, 2020, 10:50pm UTC](https://community.plotly.com/t/problem-saving-images-from-plotly/36973/8 "2020-04-02T22:50:09Z")

</div>

Hi Emmanuelle,

That image matches what I see on my machine.  
I made a smaller set of data for testing (the original was 30mb) and on my mac inside the ipython notebook the image looks like this:

 ![Screen Shot 2020-04-03 at 9.48.32 am](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/0/0759c8ee4866cb3d26a4d85350c45eeb8d4f90bb.png)

When I try to save as png it looks like this:

 ![Screen Shot 2020-04-03 at 9.48.48 am](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/9/9346596a4ff51e13223bc389531b1e9b8f61a1d2.png)
