GUI integrated with Pluto for 3D and 2D plots

I’m having trouble finding the right combination of GUI and plotting package that would work with a package I’m developing, and I was hoping to get an opinion from someone more familiar with the Julia ecosystem.

The context is that I’m developing an app similar to the one here:
where you can explore fractals like the Mandelbrot set interactively.

The extra features I would want mine to have are:

  • Integration with a notebook interface (preferably Pluto), so the user could input the functions or algorithms used to produce the plots.
  • Being able to plot the fractals on a sphere in 3D where you can interact with the view.
  • Some other math stuff.

I managed to do part of this project using only Makie, but not having menubars, file dialogs, or other GUI functionalities is starting to be a problem. So my questions are:

  • Is it feasible to make an interactive app using Gtk4Makie.jl, QML.jl or something similar and what would be the best GUI framework to use with Makie?
  • If there is no good combination of GUI + Makie, is there a GUI framework where I can make simple 3d plots directly? (I only need to plot a sphere with a texture on top, but I would need to make custom camera and plot interaction controls)
  • Or maybe I should use another plotting package (plot updates need to be fast though)?

For reference, here is a link to a previous version of this package (in Python + Matplotlib + Tk + Numba) that I made before switching to Julia:

If you are using Pluto, then you can program your own custom GUI in HTML + CSS + Javascript. I did that previously and had a good experience. You can make very beautiful interfaces and there are tons of JavaScript libraries for all kinds of inputs.

I know leaving Julia is not optional, but the GUI layer is just a small layer on top and many apps these days have some kind of HTML for the layout. In Pluto, you get the ability to use HTML/JS for free, so, it’s a very practical choice :wink:

(And of course, there is PlutoUI.jl to start with…)

Maybe WGLMakie and Pluto plus HTML + JS for those GUI elements?

1 Like

I don’t mind using Javascript, and actually the first thing I tried was to embed the interface on Pluto, but I had trouble implementing things like zooming on click. How would one get around that?

My problem was that I could get the mouse input coordinates from the cell, but couldn’t get the click to trigger a redraw of the cell output. I usually got a loop in the evaluation graph of Pluto, which gives an error, and it seemed like I would have to mess with some of the Pluto internals to redraw the output.

Also, if you don’t mind sharing, do you have some code on Github I could have a look at?