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

+1 vote

Hi everyone,

I am trying to plot using matplotlib. But I am getting the below error.

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

How can I solve this?

Thank You

Feb 27 in Machine Learning by akhtar
• 18,010 points
5,500 views

1 answer to this question.

–1 vote

Hi@akhtar,

You need to install a GUI toolkit, so that Matplotlib can display graphics (outside of Jupyter, where the browser handles display). For example, if you install the pyqt package then PyPlot should automatically use the qt5agg backend.

$ pip3 install PyQt5==5.9.2

Hope this will work.
Thank You 

answered Mar 5 by MD
• 41,820 points

Related Questions In Machine Learning

0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer

How to create plots using python matplotlib in IPython notebook?

I think you should try: I used %matplotlib inline in ...READ MORE

answered Aug 8, 2018 in Python by Priyaj
• 57,550 points
280 views
+1 vote
1 answer

How to handle Real-Time Matplotlib Plotting

To draw a continuous set of random ...READ MORE

answered Sep 26, 2018 in Python by Priyaj
• 57,550 points
8,776 views
0 votes
1 answer

How to increase plt.title font size?

Try the following : import matplotlib.pyplot as plt plt.figtext(.5,.9,'Temperature', ...READ MORE

answered Feb 11, 2019 in Python by SDeb
• 13,250 points
309 views
0 votes
1 answer

What is the best machine learning website?

Hi@akhtar You can find lots of website which ...READ MORE

answered May 20 in Machine Learning by MD
• 41,820 points
66 views