# PyPlot on remote server

**URL:** https://discourse.julialang.org/t/pyplot-on-remote-server/40049
**Category:** General Usage
**Tags:** plotting, pyplot, remote
**Created:** [May 23, 2020, 10:00pm UTC](https://discourse.julialang.org/t/pyplot-on-remote-server/40049 "2020-05-23T22:00:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![hongchengni](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@hongchengni](https://discourse.julialang.org/u/hongchengni)
#### Post date: [May 23, 2020, 10:00pm UTC](https://discourse.julialang.org/t/pyplot-on-remote-server/40049/1 "2020-05-23T22:00:47Z")

</div>

Hello, I am used to the Python Matplotlib package for plotting figures, which is packaged as PyPlot in Julia. When I want to use it for plotting on a remote server, which does not support GUI, I want to save the plot to a file. However, when I type “using PyPlot”, Julia says:

```julia
Unable to init server: Could not connect: Connection refused

```

even if I put `backend: Agg` to avoid using GUI in “~/.config/matplotlib/matplotlibrc”.  
Does anyone know how to solve the problem?  
Thanks!
