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

I am running this code.

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?

1 Like

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