# Gnuplot.jl opens up plot pane as well as an external window

**URL:** <https://discourse.julialang.org/t/gnuplot-jl-opens-up-plot-pane-as-well-as-an-external-window/49822>\
**Category:** General Usage\
**Created:** [November 9, 2020, 4:30am UTC](https://discourse.julialang.org/t/gnuplot-jl-opens-up-plot-pane-as-well-as-an-external-window/49822 "2020-11-09T04:30:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [November 9, 2020, 4:30am UTC](https://discourse.julialang.org/t/gnuplot-jl-opens-up-plot-pane-as-well-as-an-external-window/49822/1 "2020-11-09T04:30:21Z")

</div>

Plotting a figure using Gnuplot.jl inside VSCode will display an external window + the plot pane (however, the plot pane is empty). I am using WSL 2, so using the Remote - WSL extension on VSCode and also running an X-Server to show/display graphics from WSL2. I think Gnuplot automatically sets the terminal as `X11`.

Function I run:

```julia
function test_gnuplot()
    x = 1:100
    @gp x x.^2 "with lines title 'Parabola'"
end

```

Version Info

```julia
julia> versioninfo()
Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 8
  JULIA_EDITOR = "/home/affan/.vscode-server/bin/fcac248b077b55bae4ba5bab613fd6e9156c2f0c/bin/code"

```

See image below for example:

[[Album] imgur.com ![](https://global.discourse-cdn.com/julialang/original/3X/5/e/5ecc1d9b8c547500f0b27df07de908e94b41498c.jpeg "imgur.com") ](https://imgur.com/a/S0dWVC1)

I did do another test by quitting the X-Server. In this case, nothing actually shows up and my REPL hangs. I am not sure whats happening in the background.

```julia
julia> test_gnuplot() ## hangs here

```

I am guessing Gnuplot was not able to set a terminal, or that whatever terminal it set can not be shown in my window or in the plot pane.

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [November 9, 2020, 4:36am UTC](https://discourse.julialang.org/t/gnuplot-jl-opens-up-plot-pane-as-well-as-an-external-window/49822/2 "2020-11-09T04:36:34Z")

</div>

I was able to turn off the plot pane in VS Code preferences, but I was wondering if there is a solution where the X11 figure that pops up is actually shown in the plot pane?
