Plots not working on Windows

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.

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

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

1 Like

Ahhh crap. Just ran into this myself :laughing:

We narrowed it down to GKS problem on Win11 · Issue #475 · jheinen/GR.jl · GitHub, but we need help from people running windows to debug this. If we fix this in GR it shall fix the Plots bug.

1 Like

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

2 Likes

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.

@t-bltg is this the same reason I am getting this error?

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

1 Like

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

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

1 Like

Solved…
Thanks