# How to display multiple plot windows?

**URL:** <https://discourse.julialang.org/t/how-to-display-multiple-plot-windows/82246>\
**Category:** Visualization\
**Tags:** plotting, plots\
**Created:** [June 4, 2022, 7:36pm UTC](https://discourse.julialang.org/t/how-to-display-multiple-plot-windows/82246 "2022-06-04T19:36:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [June 4, 2022, 7:36pm UTC](https://discourse.julialang.org/t/how-to-display-multiple-plot-windows/82246/1 "2022-06-04T19:36:00Z")

</div>

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

I tried:

```julia
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?

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [June 4, 2022, 7:51pm UTC](https://discourse.julialang.org/t/how-to-display-multiple-plot-windows/82246/2 "2022-06-04T19:51:04Z")

</div>

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

See also [one solution here](https://stackoverflow.com/a/64024444/14071775) using Plots.jl’ `pyplot()` backend, this one requiring the keyword `reuse=false`. Copied it below for convenience:

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

```

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [June 4, 2022, 8:03pm UTC](https://discourse.julialang.org/t/how-to-display-multiple-plot-windows/82246/3 "2022-06-04T20:03:52Z")

</div>

This works fine:

```julia
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…

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [June 5, 2022, 10:59am UTC](https://discourse.julialang.org/t/how-to-display-multiple-plot-windows/82246/4 "2022-06-05T10:59:07Z")

</div>

> [@ufechner7](#):
>
> plotlyjs shows a big white border…

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