Why Plots standalone window closed automatically and load slowly?

When Julia closes, it takes any process it owns with it, like those plot windows. One solution is to use savefig("plot.pdf") and use an external viewer. But the real solution to both your problems is to not use a run-script-and-quit workflow. Julia is poorly suited to it.

Just fire up a repl, include("script.jl") and repeat. You’ll notice the plotting (and almost everything else) is faster the second time around, because then it has compiled all those methods.

2 Likes