Closed AgustinPardo closed 6 years ago
The error message seems to imply that you are working in a headless console. So fig.show() is meaningless. Are you looking for:
fig.savefig('demo.png', bbox_inches='tight')
That worked out!
If UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. % get_backend())
and using import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
Use fig.savefig('demo.pdf')
it doesnt work
Try this: matplotlib.use( 'tkagg' )
%matplotlib inline
install python-tk or python3-tk for python3
sudo apt install python3-tk
install python-tk or python3-tk for python3
sudo apt install python3-tk
Perfect :+1:
%matplotlib inline
Works great with jupyter notebook
import cv2 ... fig.show() cv2.waitKey(0)
https://www.pyimagesearch.com/2015/08/24/resolved-matplotlib-figures-not-showing-up-or-displaying/
install python-tk or python3-tk for python3
sudo apt install python3-tk
nice
install python-tk or python3-tk for python3
sudo apt install python3-tk
Thanks it worked.
Try this: matplotlib.use( 'tkagg' )
Thanks it worked.
Thanks it worked!
I was using venv with several versions of Python installed in VM. Installing python3-tk did not work. But installing the PyQt5 via pip solved this problem for me:
pip install PyQt5
Just give the command:
%matplotlib qt5
if qt5 is not available, install it first as:
pip install PyQt5
Hello sir I want to run this code but I'm unable to run this code sir can you help me from beginning...
![Uploading IMG20211107184632.jpg…] this type of errors shows when I copy the code and run in Jupiter notebook
install python-tk or python3-tk for python3
sudo apt install python3-tk
God bless you!!! problem solved.
Hello, I'm trying to run the first code lines of the tutorial:
And I recibe this error:
Do you know what is the problem and how to solve it?