# Plots not working on Windows

**URL:** <https://discourse.julialang.org/t/plots-not-working-on-windows/88322>\
**Category:** New to Julia\
**Tags:** plotting\
**Created:** [October 6, 2022, 12:58am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322 "2022-10-06T00:58:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![midori](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/midori/32/43289_2.png) [@midori](https://discourse.julialang.org/u/midori)\
**Post date:** [October 6, 2022, 12:58am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/1 "2022-10-06T00:58:06Z")

</div>

I’m trying to use plots on Julia-1.8.2 ond Windows 10 but I get the following error:

julia\> using Plots

julia\> plot(sin)  
connect: No error  
GKS: can’t connect to GKS socket application

GKS: Open failed in routine OPEN\_WS  
GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE\_WS  
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA

I already installed Plots.jl and it doesn’t work from REPL as well as from vs code.

---

<div class="post-metadata">

**Author:** ![BioTurboNick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bioturbonick/32/6380_2.png) [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Post date:** [October 6, 2022, 2:32am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/2 "2022-10-06T02:32:18Z")

</div>

Can you check what version of Plots is currently installed?  
`]st Plots`

If it’s less than v1.35.2, can you try updating it?  
`]up`

If it’s the latest version, can you try an older version?  
e.g. `]add Plots@v1.30`

---

<div class="post-metadata">

**Author:** ![midori](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/midori/32/43289_2.png) [@midori](https://discourse.julialang.org/u/midori)\
**Post date:** [October 6, 2022, 3:35am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/3 "2022-10-06T03:35:23Z")

</div>

I had v13.2 installed so I downgraded to v1.30 and now it works! Thanks!

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [October 6, 2022, 7:07am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/4 "2022-10-06T07:07:25Z")

</div>

> <https://github.com/JuliaPlots/Plots.jl/issues/4417>
>
> On Windows 11.
> 
> No plot window appears, only the error messages below.
> Have t…ried \`build Plots GR\` and reinstall with \`remove/add\`.
> 
> \`\`\`julia
> julia\> using Plots
> 
> julia\> plot(\[1,2,3,4,5\])
> connect: No error
> GKS: can't connect to GKS socket application
> 
> GKS: Open failed in routine OPEN\_WS
> GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE\_WS
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
> GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
> \`\`\`
> 
> \## Details
> 
> 
> \### Backends
> 
> This bug occurs on ( insert \`x\` below )
> 
> Backend | yes | no | untested
> \-------------|-----|-----|---------
> gr (default) | x | |
> pyplot | | | x
> plotlyjs | | | x
> pgfplotsx | | | x
> unicodeplots | | | x
> inspectdr | | | x
> gaston | | | x
> 
> \### Versions
> 
> Plots.jl version: v1.35.0
> Backend version (\`\]st -m GR\`): v0.69.3
> Output of \`versioninfo()\`:
> 
> \`\`\`julia
> julia\> versioninfo()
> Julia Version 1.8.1
> Commit afb6c60d69 (2022-09-06 15:09 UTC)
> Platform Info:
> OS: Windows (x86\_64-w64-mingw32)
> CPU: 16 × AMD Ryzen 7 6800HS Creator Edition
> WORD\_SIZE: 64
> LIBM: libopenlibm
> LLVM: libLLVM-13.0.1 (ORCJIT, znver3)
> Threads: 1 on 16 virtual cores
> \`\`\`

---

<div class="post-metadata">

**Author:** ![BioTurboNick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bioturbonick/32/6380_2.png) [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Post date:** [October 6, 2022, 7:40am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/5 "2022-10-06T07:40:06Z")

</div>

Ahhh crap. Just ran into this myself 😆

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [October 6, 2022, 7:50am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/6 "2022-10-06T07:50:06Z")

</div>

We narrowed it down to [GKS problem on Win11 · Issue #475 · jheinen/GR.jl · GitHub](https://github.com/jheinen/GR.jl/issues/475), but we need help from people running `windows` to debug this. If we fix this in `GR` it shall fix the `Plots` bug.

---

<div class="post-metadata">

**Author:** ![BioTurboNick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bioturbonick/32/6380_2.png) [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Post date:** [October 6, 2022, 7:51am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/7 "2022-10-06T07:51:41Z")

</div>

I’m a Windows person, seeing what I can do.

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [October 6, 2022, 5:06pm UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/9 "2022-10-06T17:06:15Z")

</div>

The issue should be fixed by `GR@0.69.4`, @midori, please update and confirm that the issue is resolved.

Thanks @BioTurboNick for helping fixing this.

---

<div class="post-metadata">

**Author:** ![Debartha\_Paul](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/debartha_paul/32/202192_2.png) [@Debartha\_Paul](https://discourse.julialang.org/u/Debartha_Paul)\
**Post date:** [October 8, 2022, 4:52pm UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/10 "2022-10-08T16:52:12Z")

</div>

@t-bltg is this the same reason I am getting [this error](https://discourse.julialang.org/t/problem-while-precompiling-plots-and-statsplots/88413)?

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [October 8, 2022, 5:25pm UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/11 "2022-10-08T17:25:48Z")

</div>

On your screenshots, your artifacts folder is empty, this explain the error loading the `dll`s.  
Delete it, and then run `pkg> instantiate`: it should download the artifacts and you should see `bin` and / or `lib` with `dll`s in it.

---

<div class="post-metadata">

**Author:** ![Debartha\_Paul](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/debartha_paul/32/202192_2.png) [@Debartha\_Paul](https://discourse.julialang.org/u/Debartha_Paul)\
**Post date:** [October 9, 2022, 5:08am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/12 "2022-10-09T05:08:00Z")

</div>

My `artifacts` folder is not empty, but the folder with the name `e40afe22fcfc9fe1caea4af17a4016e7ef36cd66` is totally empty. So shall I delete `artifacts` or `e40afe22fcfc9fe1caea4af17a4016e7ef36cd66`?

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [October 9, 2022, 6:52am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/13 "2022-10-09T06:52:14Z")

</div>

Try `e40afe22fcfc9fe1caea4af17a4016e7ef36cd66` first, then `artifacts` if that still does not work.

---

<div class="post-metadata">

**Author:** ![Debartha\_Paul](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/debartha_paul/32/202192_2.png) [@Debartha\_Paul](https://discourse.julialang.org/u/Debartha_Paul)\
**Post date:** [October 9, 2022, 7:25am UTC](https://discourse.julialang.org/t/plots-not-working-on-windows/88322/14 "2022-10-09T07:25:59Z")

</div>

Solved…  
Thanks
