Open new window for each plot

Hi,

how can I make sure I get a new window for each plot when using the Plots package?

E.g. if we have

p1 = getPlotOne()
p2 = getPlotTwo()

How do I now get two separate windows?

Unfortunately I do not think you can do that yet with Plots. My workaround is to save the plots to PDF files and open the PDF files in separate windows.

(if going that road, it might be useful to add

ENV["GKSwstype"] = "nul"

which will disable the plots windows completely (if not here, this is useful if using a script to build several plots without the need to interact with them).

EDIT: Apparently now there is a solution, using pyplot:

using Plots
pyplot()
p1 = plot(rand(5))
p2 = plot(rand(50), reuse=false)

https://stackoverflow.com/questions/64022527/show-two-plots-in-separate-windows-using-plots

I suggest to take a look here