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

Scatter Plot With WebGL and y_axis_type='log' does not show any points. #7348

Closed
dragoljub opened this issue Dec 26, 2017 · 5 comments
Closed

Comments

@dragoljub
Copy link

INSTALLED VERSIONS

bokeh: 0.12.13
browser: Google Chrome Version 63.0.3239.84 (Official Build) (64-bit)

commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 45 Stepping 7, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None

pandas: 0.21.1
pytest: 3.3.1
pip: 9.0.1
setuptools: 20.10.1
Cython: 0.27.3
numpy: 1.13.3
scipy: 1.0.0
pyarrow: 0.7.1
xarray: 0.10.0
IPython: 6.2.1
sphinx: 1.6.5
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.2.1
tables: 3.3.0
numexpr: 2.6.4
feather: 0.4.0
matplotlib: 2.1.1
openpyxl: 2.4.9
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: None
lxml: 4.1.1
bs4: 4.6.0
html5lib: 0.9999999
sqlalchemy: 1.1.15
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: 0.1.3
pandas_gbq: None
pandas_datareader: None

Description of expected behavior and the observed behavior

When I plot a scatter plot with backend='webgl' I have to pan up and to the right to get any points to appear, the webgl plot does not show any points on show().

If I also make the y-axis log scale with webgl backend then no points show up no matter where I pan or zoom.

I expected the log scale plot to revert back to canvas backend and show plotted points as listed in Bokeh Docs. Also I expected the linear scale webgl scatter points would not disappear based on panning position. Looks like a possible notebook/canvas/webgl alignment issue.

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

import numpy as np
import pandas as pd
from bokeh.layouts import gridplot, layout
from bokeh.plotting import figure, show, output_notebook

N = 5000
mean = 66
sigma = 1
df = pd.DataFrame({'date': pd.date_range('2018-01-01', periods=N, freq='H'),
                   'value' : np.random.lognormal(mean, sigma, N)})

output_notebook()

# basic plot
p1 = figure(x_axis_type='datetime', plot_width=450, plot_height=325,
            title = 'raw data, mean={}, sigma={}'.format(mean, sigma))
p1.scatter(df['date'], df['value'])

# with wb GL
p2 = figure(x_axis_type='datetime', plot_width=450, plot_height=325, 
            title = 'webgl, mean={}, sigma={}'.format(mean, sigma),
            output_backend='webgl')
p2.scatter(df['date'], df['value'])

# log y axis
p3 = figure(x_axis_type='datetime', plot_width=450, plot_height=325,
            title = 'log scale, mean={}, sigma={}'.format(mean, sigma),
            y_axis_type='log')
p3.scatter(df['date'], df['value'])

# log axis and webgl
p4 = figure(x_axis_type='datetime', plot_width=450, plot_height=325,
            title = 'log scale & webgl, mean={}, sigma={}'.format(mean, sigma),
            y_axis_type='log', 
            output_backend='webgl')
p4.scatter(df['date'], df['value'])

show(gridplot([p1, p2, p3, p4], ncols=2))

Screenshots or screencasts of the bug in action

image

@bryevdv
Copy link
Member

bryevdv commented Dec 26, 2017

This is a dupe of #7087

@dragoljub
Copy link
Author

@bryevdv Thanks for the quick disposition! 👍 Does #7087 cover the case where we don't specify log scale? The other issue is that with a basic webgl scatter plot with linear scale I do not see any points until I pan up and to the right. Panning down and to the left makes all points disappear. Note the blue scatter point outside the plot area overlapping the upper right plot's title.

Thanks!

@bryevdv
Copy link
Member

bryevdv commented Dec 26, 2017

@dragoljub possibly/maybe, but there's a link to this issue from the comment so it can be referenced. As the other issue mentions, ultimately there are a cluster of webgl issues that are probably all related, but no current webgl maintainer. Since I don't know anything about webgl I hope to re-do webgl support from the ground up using something like ReGL, but that's obviously a significant undertaking and I don't know when I will be able to devote time to it.

@dragoljub
Copy link
Author

@bryevdv Understood Thanks!

@bryevdv
Copy link
Member

bryevdv commented Dec 26, 2017

Certainly, worth stating if you know of anyone with ReGL/webGL experience who is looking for an OSS project to contribute to, I'd be more than happy to get them up and running, and defer to them

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

No branches or pull requests

2 participants