panel
panel copied to clipboard
3D Plotly figure jittering on mouse wheel scrolling
ALL software version info
- python 3.11.6
- panel==1.3.8
- bokeh==3.3.4
Description of expected behavior and the observed behavior
When I run a panel app with a 3d Plotly figure inside a Plotly pane, scrolling the mouse wheel makes the rendered plot jitter. I can zoom in and out smoothly only by dragging the mouse in and out while keeping the wheel pressed. This happens only on 3d plots.
Complete, minimal, self-contained example code that reproduces the issue
import panel as pn
import numpy as np
import plotly.graph_objs as go
pn.extension('plotly')
t = np.linspace(0, 10, 50)
x, y, z = np.cos(t), np.sin(t), t
fig = go.Figure(
data=go.Scatter3d(x=x, y=y, z=z, mode='markers'),
layout=dict(title='3D Scatter Plot'))
plotly_pane = pn.pane.Plotly(fig).servable()
pn.serve(plotly_pane)
Screenshots or screencasts of the bug in action
Screencast from 2024-03-15 22-15-53.webm
- [ ] I may be interested in making a pull request to address this
Thanks for reporting, suspect the view state containing the zoom level is boomeranging causing the flicker.
Hmm, just tried and I can't actually seem to reproduce this.
Thanks for your quick reply. I double checked on several systems and I can reproduce it on all of them, both Windows 11 and Fedora 38, creating a virtualenv from scratch with just panel and plotly. If this can help, I'm using plotly 5.20.0. Sometimes this issue is barely noticeable while zooming with the touchpad, you need an actual mouse to see it. Also, once the server is stopped, I can zoom with no issue at all.
Got it, thanks for reporting back. Suspect it's my touchpad then.