Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log scale graph will be blank if output_backend is webgl #7087

fgoinai opened this issue Oct 23, 2017 · 5 comments · Fixed by #7704

Log scale graph will be blank if output_backend is webgl #7087

fgoinai opened this issue Oct 23, 2017 · 5 comments · Fixed by #7704


Copy link

fgoinai commented Oct 23, 2017

ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)

OS: Windows 7 Pro SP1 x64
Browser: Firefox Nightly (58.0a1 64bit) and Chrome (61.0.3163.100 64bit)

python==3.5.4 (32bit)

Description of expected behavior and the observed behavior

Log scale grpah will be blank if output_backend is webgl
For svg and canvas backend can display log scale graph normally

Complete, minimal, self-contained example code that reproduces the issue

# just copy from
import numpy as np
from import output_file, show
from bokeh.plotting import figure

x = np.linspace(0.1, 5, 100)

p = figure(title="log axis example", y_axis_type="log",
           y_range=(0.001, 10**22), output_backend='webgl')

p.line(x, np.sqrt(x), legend="y=sqrt(x)",
       line_color="tomato", line_dash="dotdash")

p.line(x, x, legend="y=x"), x, legend="y=x")

p.line(x, x**2, legend="y=x**2"), x**2, legend="y=x**2",
         fill_color=None, line_color="olivedrab")

p.line(x, 10**x, legend="y=10^x",
       line_color="gold", line_width=2)

p.line(x, x**x, legend="y=x^x",
       line_dash="dotted", line_color="indigo", line_width=2)

p.line(x, 10**(x**2), legend="y=10^(x^2)",
       line_color="coral", line_dash="dashed", line_width=2)

p.legend.location = "top_left"

p.xaxis.axis_label = 'Domain'
p.yaxis.axis_label = 'Values (log scale)'

output_file("logplot.html", title="log plot example")

show(p)  # open a browser

Stack traceback and/or browser JavaScript console output

no error or warning shown

Screenshots or screencasts of the bug in action


Copy link

bryevdv commented Oct 23, 2017

@fgoinai webgl issues are often the most platform dependent. Can you please provide the additional information about platform and browser version? Additionally, can you make the code sample compelete? It is missing imports.

@bryevdv bryevdv changed the title Log scale grpah will be blank if output_backend is webgl Log scale graph will be blank if output_backend is webgl Oct 23, 2017
Copy link

fgoinai commented Oct 24, 2017

My teammate also tested the code snippet on Safari 11 and Chrome 61 at macOS High Sierra. Both show blank page also

Copy link

bryevdv commented Oct 24, 2017

@fgoinai great thanks for the extra info. Just by way of setting expectations, the previous maintainer of webgl in Bokeh is no longer actively contributing. I think realistically we will need to re-build webgl from the ground up on a more stable base such as ReGL, but that's obviously a big undertaking, and it will probably not happen for some time (definitely not before 1.0, so not until some time next year). For now, if webgl is not working in your particular usage then I can only suggest falling back to standard (default) canvas.

Copy link

bryevdv commented Mar 27, 2018

For the time being Bokeh will fall back to canvas for log plots, but will generate output, not a blank plot. A separate issue will be made to explore when and how webgl can be extended to include log plots.

Copy link

I came with a similar problem, my graph is blank even if not using a log scale.. The output is generated, if I used box zoom, the points will be shown..

Here is the sample code:

p = figure(tools=TOOLS, output_backend="webgl")[1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size=20, color="navy", alpha=0.5)

But if I delete " output_backend="webgl" " the graph shows.
Any idea of how to solve this?

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

3 participants