I'm having trouble with the show()
function not blocking. I've taken over a python application from someone that left and I seem to remembering this worked on his (IT reclaimed) PC.
Here's the code ...
import matplotlib.pyplot as plt
plt.title("Molding X Error")
plt.xlabel("X")
plt.ylabel("X Error")
plt.plot( ... details that work and not the problem ... )
plt.show(block=True)
plt.title("Molding Y Error")
plt.xlabel("Y")
plt.ylabel("Y Error")
plt.plot( ... details that work and not the problem ... )
plt.show(block=True)
On the other guys PC, the first show()
would display appropriately.
After dismissing the first, the second would display.
I run it, and it not only doesn't stop on the first show()
, it combines data from both the first and second with the title and labels from the second.
I step through with the debugger, and the first does show, but stepping to the second the same result is seen.
Windows 7 Pro 64-bit. Python2.7.10, Anaconda 2.3.0 which contains (apparently) matplotlib1.4.3
Note: I did read through "(python) matplotlib pyplot show() .. blocking or not?" where it was from 2011 and was referring to matplotlib1.0.1 as a solution.
plt.show
should block by default. Is your example the whole code? Look for something likeplt.ion()
.interactive: true
? What happens if you callplt.rcdefaults()
at the very beginning of your script?