Turkie in Pluto
Opened this issue · 6 comments
Very nice idea. I tried the README's small example in Pluto (both as written and using WGLMakie instead of GLMakie). It opened a new browser tab that stayed empty until the chain was done. If I clicked reload, then it would show the final plot. If I called sample a second time, then the plots in the other browser tab would update. However, it was ~10x slower than running the sampler without the callback.
Are these a known limitations? Or am I misusing Turkie?
I never tried in Pluto, but I think it should just work out of the box. Since a new browser tab it sounds like there might be some issue with the output of the figure, I am honestly not sure how it should work with interactions... What you could try is to display the TurkieCallback object in a separate cell and see what happens...
I found that if I just place
cb.figure
in a separate cell, I do get a full chart. It does not update as the sampler updates as an online plot, but is a static plot of the results. Still, it's quite useful -- thanks for the package! I'm not sure how one could coordinate the interactivity between Pluto and the online plotting here, but I imagine something from http://juliaplots.org/WGLMakie.jl/stable/ might work.
Maybe @fonsp knows more about interactions between Makie
and Pluto
especially with Observables
They don't really interact right now because the two paradigms don't fit together easily. There might be a possibility to link Observables into Pluto's model using https://github.com/JuliaPluto/PlutoHooks.jl, but the main problem to solve first is stability of WGLMakie inside Pluto.
Rendering to a video and displaying it with PlutoUI.LocalResource
might be the easiest way to get it working inside Pluto :)