# How to hold plotting window?

**URL:** https://discourse.julialang.org/t/how-to-hold-plotting-window/4169
**Category:** New to Julia
**Created:** [June 9, 2017, 9:29am UTC](https://discourse.julialang.org/t/how-to-hold-plotting-window/4169 "2017-06-09T09:29:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Gyslain](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gyslain/32/4411_2.png) [@Gyslain](https://discourse.julialang.org/u/Gyslain)
#### Post date: [June 9, 2017, 9:29am UTC](https://discourse.julialang.org/t/how-to-hold-plotting-window/4169/1 "2017-06-09T09:29:34Z")

</div>

Hi,  
Given this code :

```julia
using Plots
pyplot()
default(show = true)

plot(rand(3))
plot(rand(5))

```

The first plot is instantly overloaded by the second one. How to pause the execution as long as the window is not closed?

Thanks  
Ghislain

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [June 9, 2017, 9:37am UTC](https://discourse.julialang.org/t/how-to-hold-plotting-window/4169/2 "2017-06-09T09:37:40Z")

</div>

add an exclamation mark at the end of the second `plot` function:

```julia
using Plots
pyplot()
default(show = true)

plot(rand(3))
plot!(rand(5))

```

---

<div class="post-metadata">

### Author: ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)
#### Post date: [June 9, 2017, 9:39am UTC](https://discourse.julialang.org/t/how-to-hold-plotting-window/4169/3 "2017-06-09T09:39:51Z")

</div>

Or if you want to create the second plot in a different window, use `reuse=false`:

```julia
using Plots; pyplot()

plot(rand(3))
plot(rand(5), reuse=false)

```

But if your question is how to pause execution until the first plot is closed, I have no idea.

---

<div class="post-metadata">

### Author: ![Gyslain](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gyslain/32/4411_2.png) [@Gyslain](https://discourse.julialang.org/u/Gyslain)
#### Post date: [June 9, 2017, 9:50am UTC](https://discourse.julialang.org/t/how-to-hold-plotting-window/4169/4 "2017-06-09T09:50:10Z")

</div>

Thanks guys for the fast reply!  
I knew the `plot!` command but I missed the `reuse` option.  
I don’t need to pause execution if I have several windows.
