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, 2020 in Machine Learning by akhtar
• 38,170 points
18,670 views

1 answer to this question.

0 votes
Best answer

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, 2020 by MD
• 95,060 points

selected Dec 15, 2020 by akhtar
MD, thanks a lot! I spent several days to solve the issue, but your suggestion helped me out!
me salvaste la vida capo

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
• 58,100 points
426 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
• 58,100 points
11,189 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
417 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, 2020 in Machine Learning by MD
• 95,060 points
119 views