Skip to content

[Bug]: Matplotlib hangs on Spyder run on Mac #27231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SRattan16 opened this issue Oct 31, 2023 · 4 comments
Closed

[Bug]: Matplotlib hangs on Spyder run on Mac #27231

SRattan16 opened this issue Oct 31, 2023 · 4 comments
Labels
GUI: Qt OS: Apple status: needs clarification Issues that need more information to resolve.

Comments

@SRattan16
Copy link

SRattan16 commented Oct 31, 2023

Bug summary

I have a very basic code on my work computer to create a plot in Spyder using Matplotlib. I am new to Mac OS and installed Spyder through a standalone installer as my organization does not allow Anaconda. I have the most updated versions of Matplotlib, Spyder and Python. On running the code to generate an interactive plot, I see a white window that's frozen and hangs up. I can run Spyder only after I force quit the window.

Also, my backend is set to Automatic (Spyder-->preferences-->IPython console-->Graphics-->Backend-->automatic).
Plot works fine when I set it to inline but the disadvantage there is that it's not interactive.

Code for reproduction

import matplotlib.pyplot as plt

a=[1,2,3,4,5]
b=[1,4,6,8,10]
plt.plot(a,b)
plt.show()

Actual outcome

Screenshot 2023-10-29 at 5 19 49 PM

Expected outcome

I was expecting to create a plot that works fine when I set backend to 'inline'

Additional information

No response

Operating system

Mac OS

Matplotlib Version

3.8.0

Matplotlib Backend

Qt5Agg

Python version

3.9.6

Jupyter version

No response

Installation

pip

@rcomer
Copy link
Member

rcomer commented Nov 1, 2023

Do you see any output in the console when the window hangs? Also what happens if you set the backend to a specific interactive one?

A colleague of mine recently had a similar problem in pycharm: the traceback showed that it was somehow defaulting to the macos backend, although she was using Linux…

@QuLogic
Copy link
Member

QuLogic commented Nov 1, 2023

Are you sure you are using the Qt5Agg backend? That one has the toolbar on the top of the figure and has separators between button groups.

@jklymak
Copy link
Member

jklymak commented Nov 1, 2023

#26669 may help in asking people to debug issues like this.

@QuLogic QuLogic added the status: needs clarification Issues that need more information to resolve. label Feb 8, 2024
@greglucas
Copy link
Contributor

Closing for lack of response. Feel free to add more information and we can reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI: Qt OS: Apple status: needs clarification Issues that need more information to resolve.
Projects
None yet
Development

No branches or pull requests

6 participants