# Julia on VSCode with PyPlot

**URL:** <https://discourse.julialang.org/t/julia-on-vscode-with-pyplot/67781>\
**Category:** VS Code\
**Tags:** pyplot\
**Created:** [September 7, 2021, 12:47am UTC](https://discourse.julialang.org/t/julia-on-vscode-with-pyplot/67781 "2021-09-07T00:47:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttidrick](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@ttidrick](https://discourse.julialang.org/u/ttidrick)\
**Post date:** [September 7, 2021, 12:47am UTC](https://discourse.julialang.org/t/julia-on-vscode-with-pyplot/67781/1 "2021-09-07T00:47:33Z")

</div>

Hi All,

I’m using Julia on VSCode. My problem is getting PyPlot to show a figure. The same code work fine on a Julia REPL, but fails with no message when executing code in VSCode. Any ideas?

Thanks,

Ty

---

<div class="post-metadata">

**Author:** ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)\
**Post date:** [September 7, 2021, 1:57am UTC](https://discourse.julialang.org/t/julia-on-vscode-with-pyplot/67781/2 "2021-09-07T01:57:18Z")

</div>

Try `pygui(true)`.

Ref:  
[https://github.com/julia-vscode/julia-vscode/issues/325](https://github.com/julia-vscode/julia-vscode/issues/325)

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [September 7, 2021, 7:00am UTC](https://discourse.julialang.org/t/julia-on-vscode-with-pyplot/67781/3 "2021-09-07T07:00:46Z")

</div>

With this you get the plots in the plot panel/navigator:

```julia
using PyPlot
figure()
plot(1:10)
display(gcf())

```

---

<div class="post-metadata">

**Author:** ![Daneel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daneel/32/175_2.png) [@Daneel](https://discourse.julialang.org/u/Daneel)\
**Post date:** [September 7, 2021, 9:28am UTC](https://discourse.julialang.org/t/julia-on-vscode-with-pyplot/67781/4 "2021-09-07T09:28:16Z")

</div>

It might have something to do with interactive plotting. You can try `ion()` before you plot something. `ioff()` is the opposite function.
