# Turn off interactive plotting in GR

**URL:** https://discourse.julialang.org/t/turn-off-interactive-plotting-in-gr/54650
**Category:** General Usage
**Tags:** question, plotting
**Created:** [February 4, 2021, 8:44pm UTC](https://discourse.julialang.org/t/turn-off-interactive-plotting-in-gr/54650 "2021-02-04T20:44:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mkarikom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkarikom/32/7096_2.png) [@mkarikom](https://discourse.julialang.org/u/mkarikom)
#### Post date: [February 4, 2021, 8:44pm UTC](https://discourse.julialang.org/t/turn-off-interactive-plotting-in-gr/54650/1 "2021-02-04T20:44:43Z")

</div>

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:

```julia
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

```

---

<div class="post-metadata">

### Author: ![mkarikom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkarikom/32/7096_2.png) [@mkarikom](https://discourse.julialang.org/u/mkarikom)
#### Post date: [February 4, 2021, 10:52pm UTC](https://discourse.julialang.org/t/turn-off-interactive-plotting-in-gr/54650/2 "2021-02-04T22:52:23Z")

</div>

[It’s in the docs](https://docs.juliaplots.org/latest/output/#output), just a simple matter of removing the return value.

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