# Interactive Plotting Won't turn off

**URL:** https://discourse.julialang.org/t/interactive-plotting-wont-turn-off/36130
**Category:** New to Julia
**Created:** [March 18, 2020, 4:09am UTC](https://discourse.julialang.org/t/interactive-plotting-wont-turn-off/36130 "2020-03-18T04:09:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![astroboy](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@astroboy](https://discourse.julialang.org/u/astroboy)
#### Post date: [March 18, 2020, 4:09am UTC](https://discourse.julialang.org/t/interactive-plotting-wont-turn-off/36130/1 "2020-03-18T04:09:45Z")

</div>

Hi guys, hope you’re all doing well!

I’m having a problem with turning interactive plotting off in Jupyter. I’ve included the packages/import statement and the plotting cell below:

```julia
using PyPlot
PyPlot.pygui(false)
PyPlot.ioff()
using Statistics
using StatsBase

```

```julia
c = sort(countmap(sort(configs), alg=:radixsort))
fig = figure("3x3_histogram",figsize=(15,10))
x, y = collect(keys(c)), collect(values(c))
p1 = scatter(x, y / 10000, s=1.5, color="red")
p2 = plot(energies)
pe = errorbar(x, y / 10000, yerr=y.^0.5 / 10000, fmt="o", color="green")
ax = gca()
fig.canvas.draw()
gcf()

```

Can anyone see the problem? Or has anyone ran into this kind of thing before? Any help would be greatly appreciated, thanks so much!

---

<div class="post-metadata">

### Author: ![marius311](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marius311/32/3953_2.png) [@marius311](https://discourse.julialang.org/u/marius311)
#### Post date: [March 18, 2020, 8:05am UTC](https://discourse.julialang.org/t/interactive-plotting-wont-turn-off/36130/2 "2020-03-18T08:05:31Z")

</div>

What’s the desired behavior exactly, and what’s happening instead?

Is what you’re looking for possibly just one of the following?

```julia
pygui(true)
plot([1,2,3]) # will pop out a GUI plot

```

```julia
pygui(false)
plot([1,2,3]) # is plotted inline in the notebook
```
