ScatterGL markers not displaying

I have a function to generate a ScatterGL graph, from which I’m generating a list of html.Div with differing scatters. As long as I have 8 or less rendered, they display fine. Any more, and some no longer display the markers, even though you can still see the text on hover. Minimal example, my scattergl generating function is called: get_scatter .

def get_scatter_divs():
    scatters = []

    for param in range(12):
        scatter = html.Div([get_scatter(param)])
        scatters.append(scatter)

    # scatters = scatters[:8]
    return scatters

get_scatter_divs is called in the layout within a div. As is, 4 of the scatter plots are missing the markers even though the hover data is still viewable. If I uncomment the line, then they all work. I’ve made sure that the figure IDs are all unique, and that I don’t have animate=True . I’m not really sure how to fix this, as I was hoping to scale up to more plots and creating them all dynamically would be ideal. Any help would be appreciated.

Here’s a gif. When you get the markers to display on one, it removes them from another plot.

Unfortunately, there is a browser limit on the number of GL contexts that can be used on a page. We’ve done some work to reduce this, but there is still an upper limit. Here are some options:

  • Draw the graphs in a single dcc.Graph with subplots
  • Use scatter instead of scattergl

Here is a discussion on the issue: https://github.com/plotly/plotly.js/issues/2333. Ultimately, there might be a solution with multi-regl (https://github.com/plotly/plotly.js/issues/2333#issuecomment-370551877). This isn’t on our immediate roadmap unless a company can help sponsor the development (https://plot.ly/products/consulting-and-oem/)

1 Like

Thanks for getting back to me so quickly @chriddyp. I’ll stick to using Scatter for now.