When I call pyplot.show(block=True)
a window with the correct plot appears. When trying to manually close it, the window closes but the program won't continue to run (like it's still blocked).
For instance, the following program will display the plot window and print Before
, but after manually closing the window, the program still seems blocked, and After
is not printed.:
plt.plot(x,y)
print("Before")
plt.show(block=True)
print("After")
I work with the latest matplotlib version (2.1.2) using the interactive TkAgg backend on Python 3.5.2.
Update - Additional info: I work with Pycharm 2017.2 on Ubuntu (VM on Windows host)