# GUI integrated with Pluto for 3D and 2D plots

**URL:** https://discourse.julialang.org/t/gui-integrated-with-pluto-for-3d-and-2d-plots/110013
**Category:** General Usage
**Tags:** question
**Created:** [February 10, 2024, 12:26am UTC](https://discourse.julialang.org/t/gui-integrated-with-pluto-for-3d-and-2d-plots/110013 "2024-02-10T00:26:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vambrosi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vambrosi/32/206914_2.png) [@vambrosi](https://discourse.julialang.org/u/vambrosi)
#### Post date: [February 10, 2024, 12:26am UTC](https://discourse.julialang.org/t/gui-integrated-with-pluto-for-3d-and-2d-plots/110013/1 "2024-02-10T00:26:35Z")

</div>

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:  
[https://dannystoll1.github.io/dynamo/](https://dannystoll1.github.io/dynamo/)  
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:

> **[GitHub - vambrosi/FracPy](https://github.com/vambrosi/FracPy)**
>
> Contribute to vambrosi/FracPy development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![SteffenPL](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steffenpl/32/206270_2.png) [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)
#### Post date: [February 10, 2024, 4:30am UTC](https://discourse.julialang.org/t/gui-integrated-with-pluto-for-3d-and-2d-plots/110013/2 "2024-02-10T04:30:26Z")

</div>

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 😉

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

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [February 10, 2024, 9:36am UTC](https://discourse.julialang.org/t/gui-integrated-with-pluto-for-3d-and-2d-plots/110013/3 "2024-02-10T09:36:43Z")

</div>

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

---

<div class="post-metadata">

### Author: ![vambrosi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vambrosi/32/206914_2.png) [@vambrosi](https://discourse.julialang.org/u/vambrosi)
#### Post date: [February 12, 2024, 10:56pm UTC](https://discourse.julialang.org/t/gui-integrated-with-pluto-for-3d-and-2d-plots/110013/4 "2024-02-12T22:56:14Z")

</div>

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?
