Turn off interactive plotting in GR

How do I just save to pdf without showing the plot?
Running on on hpc, I call eg plot(stuff); savefig() but I have to suppress these previews somehow to avoid errors from non-existent qt5:

connect: Connection refused
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
1 Like

It’s in the docs, just a simple matter of removing the return value.

I didn’t realize it was still possible to call savefig() that way.

1 Like