I am preparing my Julia code as scripts that will run on a remote compute server. When I run the example locally, as
julia --project test1.jl, it produces a file
sine.pdf. When I run it remotely, it gives the following error:
QXcbConnection: Could not connect to display
connect: Connection refused
GKS: can’t connect to GKS socket application
Did you start ‘gksqt’?
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
It does, however, also produce the figure
What should I do to get rid of the error message?
using Plots x = range(0, 2π, length=300) y = sin.(x) fig = plot(x, y); savefig(fig, "sine.pdf")