Streamz hvplot resets zoom and pan on each update

Hello!

I’m trying to get a streaming plot in my panel app.
Streamz seems very handy, using emit to push new values to the plot, but there is one annoying issue with it. On each new sample, the zoom and pan are reset, so it practically makes the whole control bar of the bokeh plot useless. Is there some way to make the zoom/pan remain when emitting new samples?

Basic example to reproduce:

import panel as pn
import hvplot.streamz  # noqa
from streamz.dataframe import Random
pn.extension("bokeh")
df = Random(interval='200ms', freq='50ms')

pn.Column(df.hvplot()).servable()

Just drag around a little and see that it resets every 200ms.

Best regards,
Fredrik

1 Like