# How to use redim.step?

``````def sine_curve(phase, freq):
xvals = [0.1* i for i in range(100)]
return hv.Curve((xvals, [np.sin(phase+freq*x) for x in xvals]))

# When run live, this cell's output should match the behavior of the GIF below
dmap = hv.DynamicMap(sine_curve, kdims=['phase', 'frequency'])
dmap.redim.range(phase=(0.5,1), frequency=(0.5,1.25))
``````

(This is taken from DynamicMap — HoloViews v1.19.1)

In the demonstration, phase and frequency can change by roughly 0.001 step. But in my system, it changes only 0.25 (phase) .

How to change the step in the redim.range ?

While I though by setting redim.step like:

``````import numpy as np
def sine_curve(phase, freq):
xvals = [0.1* i for i in range(100)]
return hv.Curve((xvals, [np.sin(phase+freq*x) for x in xvals]))

# When run live, this cell's output should match the behavior of the GIF below
dmap = hv.DynamicMap(sine_curve, kdims=['phase', 'frequency'])
dmap.redim.step(phase=0.001,freqency=0.001)
dmap.redim.range(phase=(0.5,1), frequency=(0.5,1.25))
``````

But nothing changes.

I believe you just need to save it to a variable, or do it in one line.

``````import holoviews as hv
import numpy as np

def sine_curve(phase, freq):
xvals = [0.1* i for i in range(100)]
return hv.Curve((xvals, [np.sin(phase+freq*x) for x in xvals]))

# When run live, this cell's output should match the behavior of the GIF below
dmap = hv.DynamicMap(sine_curve, kdims=['phase', 'frequency'])
dmap.redim.range(phase=(0.5,1), frequency=(0.5,1.25)).redim.step(phase=0.01, frequency=0.01)
``````

Thank you very much.

BTW, could you let me know the difference between
redim.range (with redim.step)
and
redim.value?

I think redim.value is if you want discrete values, but I forget; I encourage you to try out the code