How to display multiple plot windows?

How can I display multiple plot windows at the same time?

I tried:

using Plots

x=1:0.1:100
y1=sin.(x)
y2=cos.(x)


p1 = plot(x,y1)
p2 = plot(x,y2)

display(p1)
display(p2)

But I always see only the last plot, not two at the same time.

Are there any backends that support this feature?

1 Like

Two separate windows are opened using the gaston(), plotlyjs() or inspectdr() backends.

See also one solution here using Plots.jl’ pyplot() backend, this one requiring the keyword reuse=false. Copied it below for convenience:

using Plots; pyplot()
x = 1:0.1:100
y1, y2 = sin.(x), cos.(x)
p1 = plot(x,y1)
p2 = plot(x,y2, reuse=false)
1 Like

This works fine:

using Plots; pyplot()

x=0:0.05:100
y1=sin.(x)
y2=cos.(x)

p1 = plot(x,y1, size=(640,480), legend=false)
p2 = plot(x,y2, size=(640,480), reuse=false, legend=false)
display(p1); p2

plotlyjs shows a big white border…
InspectDR looks promising…

You may prefer the look of the gaston() backend.