answered 8 years ago
Is this @interact not what you were looking for?
@interact def _(a=slider([0..20],default=2)): plot(1-a/x, (x, 0, 10)).show(figsize=3,ymin=-10)