5

I am getting a problem with my matplotlib library on MacOS High Sierra.

  • matplotlib-2.2.2
  • python 2.7.14

Here is my super simple code.

plt.ion()
plt.plot(x,y)
plt.show()

The python symbol appears on the dash board but the window cannot be found anywhere.

if I don't use ion() I can get one plot at a time.

enter image description here

1 Answer 1

3

plt.ion() seems to be bugged. Try the following workaround:

plt.ion()
plt.plot(x,y)
plt.pause(0.0001)
plt.show()

If this still does not work, try replacing the last line with:

plt.show(block=True)
Sign up to request clarification or add additional context in comments.

1 Comment

The part that made it work was addition of plt.show(block = True)

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.