plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

Incorrect behavior of Plotly.downloadImage

Open Keyur-Gondaliya opened this issue 1 year ago • 5 comments
trafficstars

i have created one 3d surface graph as i wanted now when i try it download image i see cracks in downlead image where else preview look good in screen.

Real Preview : Capture

Downloaded Image : 3D Sueface (1)

Keyur-Gondaliya avatar Jan 04 '24 11:01 Keyur-Gondaliya

Thanks @Keyur-Gondaliya - I see two issues in the downloaded image: (1) the front right surface is cut off so you lose some of the data and you see inside the shape (blue arrow) (2) there are visible seams between some of the facets (red arrows) surface cracks

Issue (2) I also see in the preview - so we should address it but it's not specific to downloadImage.

Issue (1) looks like we're somehow generating different clip boundaries during download from those we generate during initial draw. Might be something about the different aspect ratio or the different resolution? Are you able to create a codepen with this figure so we can investigate?

alexcjohnson avatar Jan 04 '24 16:01 alexcjohnson

Have you specified both width and height in the layout? If no please check the result with those being specified. Thank you!

archmoj avatar Jan 04 '24 16:01 archmoj

Have you specified both width and height in the layout? If no please check the result with those being specified. Thank you!

yes i did but did not work.

Keyur-Gondaliya avatar Jan 09 '24 10:01 Keyur-Gondaliya

Thanks @Keyur-Gondaliya - I see two issues in the downloaded image: (1) the front right surface is cut off so you lose some of the data and you see inside the shape (blue arrow) (2) there are visible seams between some of the facets (red arrows) surface cracks

Issue (2) I also see in the preview - so we should address it but it's not specific to downloadImage.

Issue (1) looks like we're somehow generating different clip boundaries during download from those we generate during initial draw. Might be something about the different aspect ratio or the different resolution? Are you able to create a codepen with this figure so we can investigate?

yes sure, will do it.

Keyur-Gondaliya avatar Jan 09 '24 10:01 Keyur-Gondaliya

hey i tried to create code and sandbox but due to large data set none worked. so i have created this file in repo with x,y and z data for 3d surface https://github.com/Keyur-Gondaliya/plotly/blob/main/dataset.js.

here we have added this extra points for making 3d surface look like base instead only paper with curve. let me know if you need anything from side.

Keyur-Gondaliya avatar Jan 23 '24 09:01 Keyur-Gondaliya