Conversation
There was a problem hiding this comment.
I started with a review, but then I actually stumbled upon how you run Makie code, which I hadn't seen before (in this context, I know about Bonito.App)
While I do have issues with WGLMakie using portforwarding etc. - typically it "just works" in a normal local environment.
What I mean is:
#cell 1
a = Observable([1,2,3.])
#cell 2
scatter(a)
# cell3
a[] = rand(3)typically works to update, whenever you run cell 3.
I therefore tried your example and the buttons also worked (didnt check the other example). Could you add some motivation why you need the App? I
Co-authored-by: Benedikt Ehinger <science@benediktehinger.de>
|
To be honest, I recently came into Pluto's world and I had some previously made animations made with GLMakie. Hence I looked for ways to integrate these animations in a Pluto notebook (with as few modifications as possible). I came across this discourse discussion: https://discourse.julialang.org/t/updated-instructions-for-makie-pluto/62531/5 So I adapted this example to my purpose and then to this tutorial. IMHO, a key purpose of this tutorial si to give more visibility to the solution provided by the discourse discussion cited above. Concerning the |
|
Here is an update:
|
Updated integration instructions for Makie animations in Pluto notebooks. Changed from using 'Bonito.App' and `DOM.div` to 'let ... end'.
OK but I would keep the sentence "You may have to manually run the cell below." in case this trouble happens to someone else than me. Do you agree ?
I am not sure to catch your point here. If I am correct, the output is the same if I replace the 3 cells by the unique cell: Interactivity is entirely handled by PlutoUI here, Observables are not needed.
Do you agree ? |
|
The difference to your example is, that in your code the whole figure is replottet, in mine, only the observable updated. In yours one often gets white flashes (especially with larger plots) and it is slower (generating a plot takes some few 100ms). I didn't really catch the last Bullerpoint. What do you mean? |
|
My bad. I wrongly copied your code or did not pay attention but I thought it had white flashes too...
I meant the white flashes you talk about. Summary: I will add your example in a new section "Integration in Pluto (with PlutoUI)" |
|
cool! Indeed! Maybe we can have a more fancy plot than the range, e.g. I think it should also be made explicit, that three cells are needed for this solution - in difference to the makie solution |
|
Than you for this nice example. I replaced the old one. Concerning the "three cells", I wrote:
|
|
@behinger @jucheval Feel free to merge this when it's ready! I can review it if you want me to but I don't need to. Can you add frontmatter? https://github.com/JuliaPluto/featured/blob/main/CONTRIBUTING.md#technical-information |
|
Oops, I forgot the frontmatter. Now it is done and you can merge whenever you want. |
|
very nice! Thanks a lot, I think this will be quite useful :-) |

As discussed in PR #94, I made a notebook to present how WGLMakie animations can be integrated into Pluto.