Linked axis range update driven by framewise DynamicMap should consider data range of all linked plots
ALL software version info
Software Version Info
holoviews 1.20.1
Description of expected behavior and the observed behavior
On first render, by default plots with a linked axis get their axis range based on the overall range found in the data across all plots.
In my use case, all plots may be DynamicMaps but for the sake of simplicity, let's say one of these plots is a DynamicMap with framewise=True, which means its axis range may change.
Currently, the linked axis range will be updated to fit the data range of the current DynamicMap value, ignoring the data in other plots. These other plots will therefore update to the range of the DynamicMap even if it's completely inadequate.
I'm not sure if this should be considered a bug or a design choice associated with framewise=True. The fact that on first render all the data is taken into account leads me to think it's the former.
Complete, minimal, self-contained example code that reproduces the issue
import holoviews as hv
import numpy as np
hv.extension("bokeh")
def dmap_callable(scale):
return hv.Curve(scale * np.ones(10)).opts(width=400, height=400, framewise=True)
dmap = hv.DynamicMap(dmap_callable, kdims=["scale"]).redim.range(scale=(-5, 5))
plot = hv.Curve(np.zeros(10)).opts(width=400, height=400)
plot + dmap
Screenshots or screencasts of the bug in action
I feel like axis range handling is inherently complex, I hope the behaviour I'm looking for is achievable with minimal effort.
I'm not completely sure I follow, but you screencast does not behave the same way for me:
https://github.com/user-attachments/assets/540e9376-1d07-4170-9845-2240a618e502
Ok this behaviour is much better! But I don't know what causes the difference.
I have to say I'm actually running it in a Panel server (version 1.6.1, bokeh 3.6.3). I use python 3.12 and it's running on ubuntu.
Mine was in a notebook. And on dev releases (though I don't think this should matter).
Can you run hv.show_versions()?
Sure!
It's the result of a simple pip install holoviews in a python:3.12-slim container.
Python : 3.12.9 (main, Feb 25 2025, 02:40:13) [GCC 12.2.0]
Operating system : Linux-6.8.0-53-generic-x86_64-with-glibc2.36
Panel comms : default
holoviews : 1.20.1
bokeh : 3.6.3
colorcet : 3.1.0
cudf : -
cupy : -
dask : -
dask-expr : -
datashader : -
geoviews : -
hvplot : -
ibis-framework : -
IPython : -
ipywidgets-bokeh : -
jupyter-bokeh : -
jupyterlab : -
matplotlib : -
networkx : -
notebook : -
numba : -
numpy : 2.2.3
pandas : 2.2.3
panel : 1.6.1
param : 2.2.0
pillow : 11.1.0
plotly : -
pyarrow : -
pyviz-comms : 3.0.4
scikit-image : -
scipy : -
spatialpandas : -
streamz : -
tsdownsample : -
xarray : -
I can't recreate in a simple environment, both with panel serve and in a notebook. Are you running your code locally?
Python : 3.12.9 | packaged by conda-forge | (main, Mar 4 2025, 22:48:41) [GCC 13.3.0]
Operating system : Linux-6.13.5-arch1-1-x86_64-with-glibc2.41
Panel comms : default
holoviews : 1.20.1
bokeh : 3.6.3
colorcet : 3.1.0
cudf : -
cupy : -
dask : -
dask-expr : -
datashader : -
geoviews : -
hvplot : -
ibis-framework : -
IPython : -
ipywidgets-bokeh : -
jupyter-bokeh : -
jupyterlab : -
matplotlib : 3.10.1
networkx : -
notebook : -
numba : -
numpy : 2.2.3
pandas : 2.2.3
panel : 1.6.1
param : 2.2.0
pillow : 11.1.0
plotly : -
pyarrow : -
pyviz-comms : 3.0.4
scikit-image : -
scipy : -
spatialpandas : -
streamz : -
tsdownsample : -
xarray : -
Yes this is running on my laptop.
I'll ask others to see if they can replicate.
A colleague also observed this behaviour on holoviews 1.20.1 and panel 1.6.1.
What browser are you using?
Your code in the first post does not look correct, as it is missing some panel code to be able to serve it.
I get the same output in Firefox and Chromium.
As for the code, I put the plots in a panel row container and serve it: pn.Row(plot, dmap).servable(). I did not include the panel code in the MRE since I figured it was a holoviews issue but you're right that it matters.
Can you try pn.panel(plot + dmap).servable()
That's it, well done!
However I would expect the plots in a pn.Row to behave the same way.
However I would expect the plots in a pn.Row to behave the same way.
I would, too, but at least I can recreate the problem.
@philippjfr, should I move this to the panel issue tracker?