Skip to content Skip to sidebar Skip to footer

Matplotlib Fails And Hangs When Plotting In Interactive Mode

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 pytho

Solution 1:

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)

Post a Comment for "Matplotlib Fails And Hangs When Plotting In Interactive Mode"