thank you, it works by adding “-i”. But I am curious what is the propose of “-i”, it looks like force julia go to the REPL, because after I ran above commend, it jumped into the REPL. I am wondering could I stay in my previous environment. Thanks
for the display window to stay open, the Julia process can’t exit. You can also put a readline() after the display() but you still won’t be able to use that terminal session.
-i puts you into interactive mode (REPL) after executing the script, which is a way to prevent exiting
On the phone so haven’t tried, but I believe you can also call wait on the return from display to wait until the window decides it is done. E.g. wait(display(fig))
what if you have multiple screens open? is there a way to wait to exit julia when running a GLMakie script until after they are all closed? i tried adding a wait to each, but the first one then became unresponsive to observable events.
using GLMakie
a = lines(rand(10))
b = scatter(rand(10))
ad = display(GLMakie.Screen(), a)
bd = display(GLMakie.Screen(), b)
wait(ad)
wait(bd)
and that seems to be responsive (can zoom in both windows, assume that is some type of observable event?) and the program is only closed when both windows have been closed.