How to change axis range after the plot is shown

I found the solution: set framewise=True

return hv.Curve((x, y), kdims=hv.Dimension("x", range=(xmin, xmax))).opts(framewise=True)