1
$\begingroup$

I am initializing empty figure when executing plt.figure(). It openes fine. But as soon as I have the following code implemented opened graph gets not responding. Any idea why this window is getting not responding?

import matplotlib.pyplot as plt
plt.figure()   # It opens graph fine

with open("data.txt") as file_data:

    while True:
        pass
$\endgroup$
1
  • $\begingroup$ I'm just checking has this question been answered? If it has please mark it as so (helps to keep the unanswered questions list clean). $\endgroup$ Commented Aug 23, 2019 at 12:57

1 Answer 1

1
$\begingroup$

The while True: loop will be causing the python interpreter to think there's something more to do. It will remain unresponsive until it 'finishes' that loop, which it will never do. Remove the Loop or replace pass with break

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.