Change "visible" property dynamically (or show/hide interactive)

Hello everyone, I am trying to show/hide Curve dynamically, but after it is showed it never hides, could you help me to figure it out, please?

import holoviews as hv
import panel as pn
import param

class Vis(param.Parameterized):
    curve_vis   = param.Boolean(False, label='Show curve') 
vis = Vis()

plot1 = hv.Curve([1,2,3,4,5,6]).apply.opts(visible=vis.param.curve_vis)
pn.Row(plot1, vis)

It seems to work fine on my system.

1 Like