# Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure

**URL:** https://discourse.julialang.org/t/matplotlib-is-currently-using-agg-which-is-a-non-gui-backend-so-cannot-show-the-figure/19113
**Category:** General Usage
**Created:** [December 30, 2018, 9:34am UTC](https://discourse.julialang.org/t/matplotlib-is-currently-using-agg-which-is-a-non-gui-backend-so-cannot-show-the-figure/19113 "2018-12-30T09:34:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)
#### Post date: [December 30, 2018, 9:34am UTC](https://discourse.julialang.org/t/matplotlib-is-currently-using-agg-which-is-a-non-gui-backend-so-cannot-show-the-figure/19113/1 "2018-12-30T09:34:01Z")

</div>

I am running this code.

```julia
using Pkg
using GaussianProcesses
using Plots
pyplot() # Optionally select a plotting backend

# Generate random data for Gaussian process
x = 2π * rand(10)
y = sin.(x) + 0.5*rand(10)

# Set-up mean and kernel
se = SE(0.0, 0.0)
m = MeanZero()

# Construct and plot GP
gp = GP(x,y,m,se)
plot(gp; xlabel="gp.x", ylabel="gp.y", title="Gaussian process", legend=false, fmt=:png)

```

And get this message:

/Applications/JuliaPro-1.0.1.1.app/Contents/Resources/pkgs-1.0.1.1/conda/3/lib/python3.7/site-packages/matplotlib/figure.py:445: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.  
% get\_backend())  
‘c’ argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with ‘x’ & ‘y’. Please use a 2-D array with a single row if you really want to specify the same RGB or RGBA value for all points.

How can I make julia pro show the plot? Is ‘c’ argument looks like… related to that too?

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [December 30, 2018, 9:38am UTC](https://discourse.julialang.org/t/matplotlib-is-currently-using-agg-which-is-a-non-gui-backend-so-cannot-show-the-figure/19113/2 "2018-12-30T09:38:52Z")

</div>

Please quote your code (you can edit your post).

> [@PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530):
>
> This is a short post on how to use backticks (` and ```) to quote code, so it is easy to read. This post can be linked to new users who are confused by this feature. Why By quoting your code, you get a monospaced font (which preserves indentation) and syntax highlighting. This makes it easier to read your code and help you. Displayed code looks like this: function displayed\_code(x::Int, y::Int) if x \< y println("x is smaller") else println("or not") end end Inline…
