JuliaAnimators / Javis.jl

Julia Animations and Visualizations
https://juliaanimators.github.io/Javis.jl/stable/
MIT License
827 stars 51 forks source link

Pluto Support and Integration #208

Closed TheCedarPrince closed 3 years ago

TheCedarPrince commented 3 years ago

Is your feature request related to a problem? Please explain.

Currently, Javis does not work within a Pluto environment. One cannot use Javis to view frames of an animation easily like they could using the built-in Javis image viewer. Furthermore, on some platforms, the Javis image viewer is not performant due to it being built using Gtk.jl.

We could perhaps get around this performance issue as well by providing browser-based support built around using Pluto as a platform.

Describe the solution you'd like

I would love to build functionality into Javis Pluto notebook support by creating something like this:

sliderplot

Source: https://blog.dominodatalab.com/interactive-dashboards-in-jupyter/

But using Pluto instead. I think this functionality could be achieved by using PlutoUi.jl. Furthermore, this might be better suited to go into its own repository. So, initial development may take place on the main branch but later move to its own dedicated location.

Describe alternatives you've considered

The best alternative would be the Javis image viewer but since not all platforms best support GTK based GUIs, this would provide greater applicability of Javis. I am not certain how Pluto will take to what I am imagining being an image viewer; I imagine Jupyter may be more performant but I am not sure at this point. Only experimentation will tell!

VarLad commented 3 years ago

Any update on this?

TheCedarPrince commented 3 years ago

Hey @clad26 - thanks for the ping!

Currently, @Sov-trotter has attempted to look into this. However, it seems like the problem, based on the discussions here are more on Pluto side. We unfortunately do not have any control over this matter from our side.

Pinging @sov-trotter if he has anymore updates he could add.

Sov-trotter commented 3 years ago

https://user-images.githubusercontent.com/43717431/112513984-ddd3a280-8dba-11eb-9288-74969ab9fb61.mp4

Not a pure integration, but something that we can add in the docs(tends to be buggy at times) Luxor does something similar here(http://juliagraphics.github.io/Luxor.jl/latest/examples/#Working-in-Pluto)

TheCedarPrince commented 3 years ago

That's fantastic @Sov-trotter ! Super curious on how you got this working - how did you hook into PlutoUI?

Sov-trotter commented 3 years ago

There are two methods to work this out:

Sov-trotter commented 3 years ago

So in anyway, the user will have to declare the Slider method via PlutoUI

Sov-trotter commented 3 years ago

https://user-images.githubusercontent.com/43717431/112682054-93732400-8e95-11eb-9a7b-70928153457f.mp4

When liveview=false

TheCedarPrince commented 3 years ago

WOW!!! @Sov-trotter - I could work with you on a PR to document how to use Pluto with Javis. I could go ahead and open one and ping you if you have time.

Sov-trotter commented 3 years ago

Would love that Thanks! I was able to solve the above issue with in-memory interactive viewer. Will push the changes in a while

Wikunia commented 3 years ago

Looks lovely! Thanks @Sov-trotter Will have a look at the PRs on Sunday. Will probably merge the Jupyter one if @TheCedarPrince is okay with that.

TheCedarPrince commented 3 years ago

I'll comment about Jupyter on that issue/PR - will jump over there @Wikunia