How to get a plot to stay open?

I’m assuming you are plotting from a julia script and using terminal to call julia script.jl.
The problem is once your execution is finished, julia exists and hence the plot also closes.
You can try adding read(STDIN, Char) after plot, or better at the end of the script. This will make the plot stay until you press enter.

I also have the similar problem; when I click close button it didn’t work. I usually do close("all") in REPL to close them. OR close(fig_num) can also be used.