[TxMt] Re: still problems with matplotlib
Alex Ross
z-textmate at lasersox.net
Wed Feb 10 00:40:26 UTC 2010
On Jan 13, 2010, at 11:32 AM, Tony S Yu wrote:
> import matplotlib.pyplot as plt
> plt.plot([0,1])
If I remove the interactive input dylib and add a call to “plt.show()”, this script works. Actually, this script doesn't even work from Terminal unless I'm in interactive mode with python. This is because “plot” is non-blocking, it just draws the plot in the window, and returns. Python then exits, and the window disappears. The “show” *is* blocking, so python remains running until you close the window. In interactive python you don't need the call to show, because python is going to block waiting for user input anyway.
As for why the dylib breaks matplotlib, I'm not exactly sure yet. Looking into it…
—Alex
More information about the textmate
mailing list