Plotting Atomic Orbitals with Makie

What about the organization do you not like at the moment? You’re not necessarily using the easiest syntax, but there’s also nothing inherently wrong with it. But for example, I wouldn’t put the axis over so many rows and columns, to match with the menu. It’s easier to nest GridLayouts so they’re independent (why should the rows of the gui part have anything to do with the size of the plot).

Here’s an example:

f = Figure()

LScene(f[1, 1])
scatter!(randn(100, 3))
gui_grid = f[1, 2] = GridLayout(width = 200, tellheight = false)

Label(gui_grid[1, 1][1, 1], "Label")
Menu(gui_grid[1, 1][1, 2])

ls = labelslider!(f, "slider", 1:10)
gui_grid[2, 1] = ls.layout

togglegrid = gui_grid[3, 1] = GridLayout(tellwidth = false)
Toggle(togglegrid[1, 1])
Label(togglegrid[1, 2], "show axis")

Button(gui_grid[4, 1], label = "save", tellwidth = false)

f

2 Likes