`figure.circle` render jumps around x-axis when zooming
See original GitHub issueI’m a big fan of the library and have tried to be thorough in this bug report. Finding something like this might turn off people. If I’m doing science and the data appears to change while interacting, that breaks everything.
HTH
ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)
- bokeh == 1.04
- python == 3.7.2
- Linux - Ubuntu 16
- Chrome browser
Description of expected behavior and the observed behavior
Time series data from two curves plotted on same figure, when zooming the x-values of one curve jumps left and right of the reference curve. Not sure if the actual values are changing (unlikely) but it’s rendered position, relative to the reference curve jumps to the left and to the right or to the nominal position when zooming in/out.
Complete, minimal, self-contained example code that reproduces the issue
from bokeh.plotting import figure, output_file, save
from bokeh.models import ColumnDataSource, LinearColorMapper, Range1d, WheelZoomTool
from bokeh.layouts import column, row
import numpy as np
import pandas as pd
fig_kwargs = {
"x_axis_type": "datetime",
"width": 1900,
"height": 400,
"tools": "pan,save,reset,box_zoom,xwheel_zoom",
"active_scroll": "xwheel_zoom",
"output_backend": "webgl",
}
output_file(f"reproduce.html")
fig = figure(**fig_kwargs)
control = np.arange(100)
df = pd.DataFrame(
{
"time": pd.date_range(pd.datetime.now(), periods=100, freq="1s"),
"ctrl": control,
"test": control + 5 * np.random.randn(100),
}
)
# control
fig.scatter(
x=df.time,
y=df.ctrl,
line_color="red",
fill_color=None,
marker="cross",
size=5,
legend="control line",
)
# test - no worky
fig.circle(
x=df.time,
y=df.test,
fill_color=None,
line_color="black",
size=5,
legend="test - wierd",
)
# test - yes worky
fig.scatter(
x=df.time,
y=df.test,
fill_color=None,
line_color="blue",
size=5,
legend="test - normal",
)
save(column(fig))
Stack traceback and/or browser JavaScript console output
Possibly issue related to WebGL backend compatibility
Screenshots or screencasts of the bug in action
Working at 1st zoom-level when method is scatter
Working at 2nd zoom-level when method is scatter
Not Working at 1st zoom-level when method is circle
Not Working at 2nd zoom-level when method is circle
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Scatterplot Zoom - Condense X-axis instead of changing ...
I'm running into a unique issue where instead of changing the radius of each point during zoom, the axis (X- axis) need to...
Read more >D3 v4 Zoom x-Axis Zooming and Panning Issue - Stack Overflow
I'm updating the graph differently when panning and zooming in order to decrease the amount of times we regenerate the graph.
Read more >Creating a zoom effect with scroll interactions - YouTube
In this stream, we'll create a zooming effect based on the new Magic Leap website (https://www.magicleap.com/).
Read more >D3 zoom — the missing manual - freeCodeCamp
The zoom base is the parent element the zoom is attached to or registered on, as they say. It does two things: 1)...
Read more >Adjust your zoom and view options – Figma Help Center
On both Mac and Windows trackpads, you can use the following gestures to adjust zoom: Stretch two fingers apart to zoom in. Pinch...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@devjit There have been a few small improvements to webgl codepaths recently. It’s possible this was fixed incidentally/accidentally as part of those—you’d just need to try a latest release and see. The large chunk of work I described above (re-writing the webgl backend) has not started yet (we did not get the CZI funding in 2019)
There was the start of a major webgl re-work in 2.2 and as of that release I can no longer repro this issue, so I will close. If you can still see this issue with 2.2+ please provide a complete minimal reproducer to investigate.
Note that there is a small unrelated issue where webgl does not like like None colors (I had to set
fill_color
to “white” e.g.)