Hi,

Easiest way to do this is with @manipulate and `withfig` as you have
discovered.

I'm inclined to remove @lift from reactive since it's hard to implement
correctly and has caused frustrating problems. (also it's not eval-free)

I recommend you use the lift function instead.

s = slider(1:10)
display(s)
lift(x -> greyim(eye(x)), s)

Should do the trick for you.

With PyPlot, this will be:

f = figure()
lift(s) do slider_val
   withfig(f) # This basically says "do the drawing on the same plot f."
   .... plot something with slider_val...
end






On Mon, Aug 3, 2015 at 12:06 AM, Júlio Hoffimann <julio.hoffim...@gmail.com>
wrote:

> Hi,
>
> Suppose I have:
>
> s = slider(1:10)
> img = @lift eye(s)
>
> How can I create the interactive plot in Jupyter using @lift?
>
> @lift imshow(img)
>
> I know @manipulate has the withfig() option where we can pass the PyPlot
> Figure object, what about @lift?
>
> -Júlio
>

Reply via email to