✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Can't export subplot to image online | Critical # of traces that break plot

Hello community, hopefully somebody can give me some insight into my issue.

Plotly Version: 3.2.1

I’ve created a plot subplot and I’m having issues exporting the figure into any image format (I’m a pro subscriber so I can test all of the image formats, including vector and raster).

The issue is that if I include over a critical number of traces then I’m unable to export the plot from the website. In chrome it shows “Failed - No file” in the dialog box. See below:

The plot title indicates that there are 245 different traces total.

If I decrease the number of traces to only 197 then there is no export issue and I can download the images to file just fine. See below:

Neither 245 or 197 seem large enough to warrant issues like this. I imagine that maybe this is an issue related to subplots? I’m frankly have no idea about the internals of image export.

Anyways thanks ahead of time for taking a look at my issue.

Raul Flores

Hello Raul,

If you’re a Pro subscriber then you can access our dedicated support system at https://support.plot.ly/ and create a ticket there for personalized support (during Eastern Time business hours).


1 Like

Hello Nicolas,

Thank your for the recommendation.
Unfortunately I misspoke when I said I had a pro account. I only have a student account so I don’t qualify for pro support.

So this issue is still open, if anybody has had issues with the online image exporter please share your experience.

In fact there is a critical number of traces above which you cannot export… The exporter code is part of Plotly Orca, and the relevant line is: https://github.com/plotly/orca/blob/2b5cf94ab214c52f988303878d46fe894e0bc80b/src/component/plotly-graph/parse.js#L116

The reason for this code is that certain types of plots overload our export system and cause problems for all users of Plotly Cloud, so we cap the plot complexity at some point using these heuristics.

1 Like

Thanks for the info @nicolaskruchten

I see, it certainly makes sense to have a cap on the number of traces for image export on the plotly’s end.

Although I wish the cap was a bit higher. In the case of subplots I assume the cap is for the total sum of traces across all N subplots, in which case you would more easily reach the cap with a reasonable amount of traces per plot.

Do you know if using the new offline image export scheme (introduced with plotly3) will circumnavigate this limitation?

I previously had issues setting up ORCA on my system (Windows 10 with WSL), but it works for my purpose I might give it another shot.

Raul Flores

The new plotly.py exporting system uses the same Orca code as Plotly Cloud, although I’m not sure if it uses the same filtering for large figures… @jmmease do you know?

Hi @flores12,

when plotly.py uses orca locally it does not enable the “safe mode”, so there is no predefined restriction on the number of traces. I just tried an export of 1000 2-point scatter traces and that completed successfully.

I haven’t personally tried to install orca on WSL, but based on a some quick google searches, it looks like the AppImage approach probably won’t work out of the box (https://github.com/Microsoft/WSL/issues/1610). But it seems people have gotten anaconda installed on WSL (https://www.reddit.com/r/bashonubuntuonwindows/comments/82qif4/using_anaconda_on_wsl/) so I’d recommend trying to install it through conda (See https://github.com/plotly/orca#method-1-conda).

Hope that helps!

1 Like

Great news! Thanks for testing this out Jon, the new offline static image export really is a much needed feature so I’m glad to see it implemented.

As I recall, even the conda installer for ORCA was giving me issues but this is why it’s useful to have a linux box for situations like this.

All is well, thanks everybody for the feedback.