matplotlib window hang
See original GitHub issueDescription
What steps will reproduce the problem?
I’m using as graphical backend the qt5 options. When I am ploting something for example
import matplotlib.pyplot as plt plt.plot([1,2,3,4,5,6,7])
and open then the preference menu to adjust the plot, then the figure hang and I can only close it with plt.close(‘all’) at the console.
If I do the same at a python console without spyder I can not reproduce the problem, so I think the problems has something to do with spyder.
Versions
- Spyder version: 5.2.2
- Python version: 3.7.3
- Qt version: 5.12.10
- PyQt5 version: 5.12.3
- Operating System: Linux 4.19.0-19-amd64
Dependencies
# Mandatory:
atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 4.0.0 (OK)
cloudpickle >=0.5.0 : 1.6.0 (OK)
cookiecutter >=1.6.0 : 1.7.2 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree >=3.0.2 : 3.1.0 (OK)
IPython >=7.6.0;<8.0.0 : 7.29.0 (OK)
jedi >=0.17.2;<0.19.0 : 0.17.2 (OK)
jellyfish >=0.7 : 0.8.9 (OK)
jsonschema >=3.2.0 : 3.2.0 (OK)
keyring >=17.0.0 : 23.0.1 (OK)
nbconvert >=4.0 : 6.0.7 (OK)
numpydoc >=0.6.0 : 1.1.0 (OK)
parso >=0.7.0;<0.9.0 : 0.7.0 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.8.0 (OK)
pygments >=2.0 : 2.8.1 (OK)
pylint >=2.5.0 : 2.7.4 (OK)
pyls_spyder >=0.4.0 : 0.4.0 (OK)
pylsp >=1.3.2;<1.4.0 : 1.3.3 (OK)
pylsp_black >=1.0.0 : 1.0.0 (OK)
qdarkstyle =3.0.2 : 3.0.2 (OK)
qstylizer >=0.1.10 : 0.1.10 (OK)
qtawesome >=1.0.2 : 1.0.2 (OK)
qtconsole >=5.2.1;<5.3.0 : 5.2.1 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
rtree >=0.9.7 : 0.9.7 (OK)
setuptools >=49.6.0 : 56.0.0 (OK)
sphinx >=0.6.6 : 3.5.4 (OK)
spyder_kernels >=2.2.1;<2.3.0 : 2.2.1 (OK)
textdistance >=4.2.0 : 4.2.1 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog >=0.10.3 : 1.0.2 (OK)
xdg >=0.26 : 0.27 (OK)
zmq >=17 : 22.3.0 (OK)
# Optional:
cython >=0.21 : 0.29.23 (OK)
matplotlib >=2.0.0 : 3.5.1 (OK)
numpy >=1.7 : 1.21.3 (OK)
pandas >=1.1.1 : 1.2.3 (OK)
scipy >=0.17.0 : 1.7.1 (OK)
sympy >=0.7.3 : 1.9 (OK)
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
matplotlib draw() freezes window - python - Stack Overflow
This allows me to retain control of the graph after I show and it doesn't freeze up whenever I try to move the...
Read more >Closing matplotlib window hangs when invoking 'show' in ...
My basic workflow is to run a Python script with "show command line afterwards". ... But when the last figure is closed, matplotlib...
Read more >Interactive figures and asynchronous programming - Matplotlib
Matplotlib supports rich interactive figures by embedding figures into a GUI window. The basic interactions of panning and zooming in an Axes to...
Read more >window freezes when using specshow with plt.show()
The (very) recent matplotlib 3.5.2 release does include a fix for a "performance regression" in pcolormesh, which might be exactly the issue you ......
Read more >Matplotlib: Hangs on plt in Linux : r/Python - Reddit
import matplotlib.pyplot as plt. plt.plot([1,2,3,4]). plt.show (). This works fine on the Mac and the plot window shows, but not under Linux ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is it the same issue as described here https://github.com/spyder-ide/spyder/issues/16946 ? If so it appears to be a matplotlib issue, and a fix is merged for next release of matplotlib 3.5.2 (see https://github.com/matplotlib/matplotlib/pull/22202). Might also work to downgrade matplotlib to 3.4
Thanks @rhkarls for the clarification!
@mhofsaess, my bad, sorry. I messed up the Matplotlib versions.