Export to static image without orca
zxcqirara opened this issue · 3 comments
How can I export plot to local PNG or JPG without orca?
Since Plotly is a web-based library, it is not possible to directly export image from JVM. It is possible to do from the plot itself:
You can change the format of exported image like it is done here.
It is also possible to export image via python package provided by plotly, but it is not that relyable: https://github.com/mipt-npm/plotly.kt/blob/master/examples/src/main/kotlin/svgSaveViaOrca.kt
Since Plotly is a web-based library, it is not possible to directly export image from JVM. It is possible to do from the plot itself: You can change the format of exported image like it is done here.
It is also possible to export image via python package provided by plotly, but it is not that relyable: https://github.com/mipt-npm/plotly.kt/blob/master/examples/src/main/kotlin/svgSaveViaOrca.kt
I need to export it to PNG from code, not manually
Sadly, it is possible only via Orca. Plotly recommends to use the new tool Kaleido (https://plotly.com/python/static-image-export/), but last time we tried, it was bugged and was almost impossible to use outside python. As far as I can understan, it just uses chromium embedded to render the plot and save the picture. So this option does not work that well. Sadly, it is a limitation of the underlying library.