0

I am trying display an image with matplotlib.pyplot in pycharm's (2021.3 community edition) on Ubuntu 20.04.3 LTS

import matplotlib.pyplot as plt
...
plt.imshow(img)
plt.show()

but got the error:

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

I also tried plt.imshow(x) in debugging mode and got <matplotlib.image.AxesImage at 0x7f1d6436f490> without displaying the image. Both of them used to work before. I don't know where the problem is coming from.

Craving_gold
  • 107
  • 9
  • To whoever closes this question, I had earlier checked the shared link and tried my best before asking on stackoverflow. The shared link does not solve my problem in debugging mode. Could you go ahead and reopen the question again, please – Craving_gold May 16 '22 at 13:53

0 Answers0