Webgl stopped plotting glyphs

Hi there,

My company uses Bokeh version 2.4.2

Im not sure what changed here. I normally plot a lot of points and use webgl like this minimum example:

from bokeh.plotting import figure, show
from bokeh.models import ColumnDataSource

# Define a simple DataFrame
data = {
    'x_values': [1, 2, 3, 4, 5],
    'y_values': [6, 7, 2, 3, 6],
}

# Convert DataFrame to ColumnDataSource
source = ColumnDataSource(data)

# Create a new figure
p = figure(title="Simple Scatter Plot in Bokeh", x_axis_label='x', y_axis_label='y',
           output_backend="webgl",
          )

# Add a scatter plot to the figure
p.scatter('x_values', 'y_values', source=source, size=20, color="navy", alpha=0.5)

# Display the figure
show(p)

Which outputs:

but without webgl set (so just comment out the above line to #output_backend=“webgl”,)

i can then see the points:

Does anyone know why webgl would have stopped working?

Cheers,
Eric

@Eric_Johnson My primary advice is to try with a current version (latest release is 3.3) since there will definitely not be any further work or backports to 2.x releases, and a new core maintainer has done extensive work and improvement to webgl since 2.x versions as well.

Otherwise I don’t really have any concrete suggestions to offer for 2.4.2 except to suggest inspecting the browser JS console for any obvious error messages. You might also compare other browsers or browser versions. It’s not impossible that new browsers make changes that affect old Bokeh versions in ways we cannot control or mitigate, except through new releases.

cc @Ian_Thomas

Please look at the browser’s JavaScript console for error messages, as Bryan says.

Your Bokeh installation hasn’t changed between it working and not working, so the question is what has changed? Assuming your graphics card is the same, the most likely changes are browser version or graphic card driver version. It is possible that either of those has introduced a bug that affects our WebGL usage, or have removed or deprecated some functionality that we rely upon. Both of these possibilities should be reported in the JavaScript console.

Indeed I’m not sure what has changed. I didnt update the browser. I can check with IT to see if they changed anything as we run Jupyter Lab off a server.

Monday it worked, Tuesday it would not plot with webgl, and now today it will plot just fine with or without webgl. So unfortunately at this time i can not reproduce the issue. The console right now with webgl, then run again without it (both cases plot the points just fine) is:
image

@Eric_Johnson are you manually providing BokehJS links in a template? If so they are out of date with the installed Python version, as you should not see that version mismatch. 2.4.2 vs 2.4.3 is probably not a big deal but really the only supported configuration is matched Python/JS versions.

In any case if you do see the webgl error again, please try to check the JS console at that time.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.