Conversion fails with Scattergl
See original GitHub issueIf I want to create an offline plot that contains the plotly Scattergl command I get an error message.
Consider the example below (which is run through a jupyter notebook with linux host and windows guest):
import plotly.io as pio
import plotly.graph_objs as go
traces = []
traces.append(
go.Scattergl(
y=[1, 3, 2]))
layout = go.Layout(
width=800)
fig = go.Figure(data=traces, layout=layout)
# Plot and embed in ipython notebook
pio.write_image(fig, "simple_fig.png")
This will give the following error:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-10-92d1a9d074fc> in <module>()
14
15 # Plot and embed in ipython notebook
---> 16 pio.write_image(fig, "simple_fig.png")
~/usr/local/lib/python3.6/site-packages/plotly/io/_orca.py in write_image(fig, file, format, scale, width, height, validate)
1483 width=width,
1484 height=height,
-> 1485 validate=validate)
1486
1487 # Open file
~/usr/local/lib/python3.6/site-packages/plotly/io/_orca.py in to_image(fig, format, width, height, scale, validate)
1388 Unfortunately, we don't yet know of an easy way to install poppler on Windows.
1389 """
-> 1390 raise ValueError(err_message)
1391
1392
ValueError:
The image request was rejected by the orca conversion utility
with the following error:
525: plotly.js error
Changing Scattergl to Scatter will make the example work.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
plotly.graph_objects.Scattergl — 5.11.0 documentation
Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data. The 'array' property is an...
Read more >Python Figure Reference: scattergl Traces - Plotly
Scattergl trace is a graph object in the figure's data list with any of ... If the axis `type` is "date", then you...
Read more >When I'm plotting bubble chart in plotly I'm getting an error
I'm getting this error. Invalid element(s) received for the 'size' property of scattergl.marker Invalid elements include: [nan, nan, nan, ...
Read more >Visualization with Plotly.Express: Comprehensive guide
Luckily python and pandas library allows converting between these ... can try to pick one of the columns, but the result is a...
Read more >Python Plotly - How to add multiple Y-axes? - GeeksforGeeks
Python-Plotly · Python. Practice Tags : python. Improve Article. Report Issue.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same problem. I export my
plotly.express
scatter plots to JSON, where I replacescattergl
withscatter
as a workaround and generate my.png
files. I will experiment with this a bit longer for more elegant solution, but I already wasted several hours on basic plot dumps due to this issue. I tested all the proposed solutions, likeetc., but none of them works.
BTW,
README.md
in repo root claims that default port for orca is9091
, while plotly randomly sets the port each time. That’s super unclear when using it in remote Docker containers (SSH with port forwarding & Docker on remote machine).Dear @jonmmease
Thanks for your help. I tried your suggestion and have orca and Xvfb in the path.
However I still get the same error messages as above when I run the scripts via jupyter or directly on the linux host.
Additionally after trying to run the commands a few times, opening and closing the notebook I’m left with the following processes: