Change xlim dynamically with param

Hello everyone, I would like to change xlim by parameter, I am doing it in this way:

import holoviews as hv
import panel as pn
import param
from holoviews.streams import Pipe, Buffer

class Xrange(param.Parameterized):
    xlim = param.Range((20,100), bounds=(0,None), softbounds=(None,100))
xrange = Xrange()

_points     = Pipe(data=[1,2,3,4,5,6,7])
plot1 = hv.DynamicMap(hv.Points, streams=[_points]).apply.opts(xlim=xrange.param.xlim)
pn.Row(plot1, xrange)

unfortunately nothing happens, could you please help me to manage it?

Add framewise=True to your opts like this:
plot1 = hv.DynamicMap(hv.Points, streams=[_points]).apply.opts(xlim=xrange.param.xlim, framewise=True)

1 Like

Dear Sir, thank you so much!!! That works like a charm.

1 Like

@Hoxbro thanks for this tip. I’m running to similar problem. With adding framewise=True I got some progress, but didn’t completely solved it.
When data_aspect=1 the ‘x’ range gets corrected, but not the ‘y’ ranges.
When data_aspect=.5 the ‘y’ range gets corrected, but not the ‘x’ ranges.
It worth mentionng here that I’m calculating the ranges and passing them through xlim and ylim still the axis are not behaving as it’s expected.
Any tip to get both being affected?
Here is my post with a minimum example.